-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ReactAsset improve error messages #421
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## bazel-6 #421 +/- ##
========================================
Coverage 91.75% 91.76%
========================================
Files 339 339
Lines 27044 27068 +24
Branches 1962 1966 +4
========================================
+ Hits 24814 24838 +24
Misses 2216 2216
Partials 14 14 ☔ View full report in Codecov by Sentry. |
@@ -75,4 +75,9 @@ export class Registry<V> { | |||
clear() { | |||
this.store = createSortedArray<V>(); | |||
} | |||
|
|||
/** Check if the registry is empty*/ | |||
isRegistryEmpty() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sugarmanz @hborawski Do we expose the partial match registry on every platform(It doesn't look like we do but I just wanted to check)? If so we should also add this to every platforms API.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do have it in iOS, but it's not exposed to users + no Swift API currently
react/player/src/asset/index.tsx
Outdated
`No implementation found for id: ${unwrapped.id} type: ${ | ||
unwrapped.type | ||
}. This could happen for one of the following reasons: \n |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we check for similarly named types and suggest alternatives?
No implementation found for type: "txt" did you mean "text"?
2b24527
to
64d033b
Compare
Issue: #376
Test result: https://app.buildbuddy.io/invocation/8eb077c0-1586-4699-b732-c92c332e7697
What's changed: improve error msg thrown by ReactAsset. more info and react-like errors
Before: if no matched asset found, throw error:
No implementation found for id: bar-id type: bar
After:
add check for no assets in registry
modify existing error msg for no match asset found
Change Type (required)
Indicate the type of change your pull request is:
patch
minor
major
Does your PR have any documentation updates?