1.6.1-0.1.1: [enhancement] - Error Handler#194
Merged
lnbc1QWFyb24 merged 5 commits intodevelopfrom Jun 9, 2021
Merged
Conversation
taylorjdawson
approved these changes
Jun 8, 2021
src/notify.ts
Outdated
| blocknative = new BlocknativeSdk({ | ||
| dappId, | ||
| networkId, | ||
| onerror: appOptions.onerror, |
Contributor
There was a problem hiding this comment.
@aaronbarnardsound is there a reason that you didn't de-structure this along with the rest of the appOptions above? e.g.
const { dappId, networkId, name, clientLocale, onerror } = appOptions
Collaborator
Author
There was a problem hiding this comment.
Yeah good call, I have updated to de-structuring
Collaborator
Author
|
Closes #193 |
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds a new parameter to the initialization object:
onerror. This will get passed on to the SDK so that all errors that return from the server will get passed on to the function that is added on init. This will allow devs to handle rate limit errors in particular, allowing them to decide whether to remove notifications or add a custom notification indicating the error.