···3434 * Used for FeedFeedback and other ephemeral non-critical systems.
3535 */
3636export function setUnstablePostSource(key: string, source: PostSource) {
3737- assertValid(
3737+ assertValidDevOnly(
3838 key,
3939 `setUnstablePostSource key should be a URI containing a handle, received ${key} — use buildPostSourceKey`,
4040 )
···5151export function useUnstablePostSource(key: string) {
5252 const id = useId()
5353 const [source] = useState(() => {
5454- assertValid(
5454+ assertValidDevOnly(
5555 key,
5656- `consumeUnstablePostSource key should be a URI containing a handle, received ${key} — use buildPostSourceKey`,
5656+ `consumeUnstablePostSource key should be a URI containing a handle, received ${key} — be sure to use buildPostSourceKey when setting the source`,
5757+ true,
5758 )
5859 const source = consumedSources.get(id) || transientSources.get(key)
5960 if (source) {
···8788/**
8889 * Just a lil dev helper
8990 */
9090-function assertValid(key: string, message: string) {
9191+function assertValidDevOnly(key: string, message: string, beChill = false) {
9192 if (__DEV__) {
9293 const urip = new AtUri(key)
9394 if (urip.host.startsWith('did:')) {
9494- throw new Error(message)
9595+ if (beChill) {
9696+ logger.warn(message)
9797+ } else {
9898+ throw new Error(message)
9999+ }
95100 }
96101 }
97102}