Skip to content

fix(brownie): throw descriptive error when store not registered#203

Merged
okwasniewski merged 1 commit intomainfrom
oskar/brownie-store-not-found-error
Jan 19, 2026
Merged

fix(brownie): throw descriptive error when store not registered#203
okwasniewski merged 1 commit intomainfrom
oskar/brownie-store-not-found-error

Conversation

@okwasniewski
Copy link
Copy Markdown
Contributor

Summary

  • Improves error handling when a Brownie store is accessed from JS but not registered on native side
  • Throws descriptive error with Swift code example showing how to fix

Changes

When getOrCreateStore() is called for a store that wasn't registered natively, it now throws:

[Brownie] Store "BrownfieldStore" not found. Make sure to register it on the native side before accessing it from JS.

Swift example:
  BrownfieldStore.register(BrownfieldStore(...))

This should be called before React Native starts.

Previously, this would silently return empty objects leading to confusing behavior.

@okwasniewski okwasniewski merged commit ae21134 into main Jan 19, 2026
6 checks passed
@okwasniewski okwasniewski deleted the oskar/brownie-store-not-found-error branch January 19, 2026 11:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants