Skip to content
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

4.2.0-0.1.0 [Feature] Error Handling for UNSUPPORTED_CHAIN_MSG #186

Merged
merged 4 commits into from
May 18, 2022

Conversation

julianapeace
Copy link
Contributor

@julianapeace julianapeace commented May 17, 2022

Description

This PR introduces an error message when bn-server sends back the UNSUPPORTED_CHAIN_MSG. The message is received when the requested networkId is not allowed by the users tier. The websocket will close and an error message is returned (introduced in this PR https://github.com/blocknative/bn-server/pull/1273)

This PR also moves the simulation error handling further down the file so that unhandled error messages do not get caught at an undefined event object.

Prior to this fix, the SDK will just fail here

if (event.categoryCode === 'simulate') {
      simulations$.error(event)
      return
 }

With the fix, end users will see a user friendly error message.

Screen Shot 2022-05-17 at 6 01 03 PM

Checklist

  • The version field in package.json is incremented following semantic versioning
  • The box that allows repo maintainers to update this PR is checked (where is this box?)
  • I tested locally to make sure this feature/fix works

@julianapeace julianapeace requested a review from lnbc1QWFyb24 May 17, 2022 23:00
Copy link
Collaborator

@lnbc1QWFyb24 lnbc1QWFyb24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍

@julianapeace julianapeace changed the title 4.2.0-0.2.0 [Feature] Error Handling for UNSUPPORTED_CHAIN_MSG 4.2.0-0.1.0 [Feature] Error Handling for UNSUPPORTED_CHAIN_MSG May 18, 2022
@julianapeace julianapeace merged commit abfe6d3 into develop May 18, 2022
@julianapeace julianapeace deleted the feature/chains-for-tier-error-handling branch May 18, 2022 02:18
dmarzzz added a commit that referenced this pull request Jun 9, 2022
* 4.0.0-0.1.0 : Add fantom network #173

* Add fantom network (fantom-main) to Network type in interfaces.ts  and networks object in defaults.ts

* Update version

* 4.0.0-0.1.1 - Test whether localStorage is accessible before performing operations (#172)

* 4.1.0 Release - Develop (#175)

* Update version

* Add gasGwei values

* Feature/ws simulate (#178)

4.1.0-0.1.0: Handles websocket simulation requests

* DEVELOP - Release/4.2.0 (#180)

4.2.0 Release

* 4.2.0-0.1.0 [Feature] Error Handling for UNSUPPORTED_CHAIN_MSG (#186)

* 4.2.0-0.1.0 [ feature ] : Mumbai testnet support (#185)

* add support for matic-mumbai

* add support for matic-mumbai

* add support for matic-mumbai

* v4.3.0

* Bump ajv from 6.12.2 to 6.12.6 (#182)

Bumps [ajv](https://github.com/ajv-validator/ajv) from 6.12.2 to 6.12.6.
- [Release notes](https://github.com/ajv-validator/ajv/releases)
- [Commits](ajv-validator/ajv@v6.12.2...v6.12.6)

---
updated-dependencies:
- dependency-name: ajv
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump minimist from 1.2.5 to 1.2.6 (#179)

Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6.
- [Release notes](https://github.com/substack/minimist/releases)
- [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6)

---
updated-dependencies:
- dependency-name: minimist
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Create issue-to-notion.yml (#177)

* 4.1.0 Release - Master (#174)

* 4.0.0-0.1.0 : Add fantom network #173

* Add fantom network (fantom-main) to Network type in interfaces.ts  and networks object in defaults.ts

* Update version

* 4.0.0-0.1.1 - Test whether localStorage is accessible before performing operations (#172)

* Update version

* Add gasGwei values

Co-authored-by: Aaron Barnard <abarnard@protonmail.com>
Co-authored-by: Arseniy Ivanov <138289+freeatnet@users.noreply.github.com>

* Create issue-to-notion.yml

Co-authored-by: Adam Carpenter <adamcarpenter86@gmail.com>
Co-authored-by: Aaron Barnard <abarnard@protonmail.com>
Co-authored-by: Arseniy Ivanov <138289+freeatnet@users.noreply.github.com>

* 4.2.0-0.2.0: [enhancement] - Expose Watched Items (#191)

* Expose watchedItems

* Increment version

* Fix eventCode error

Co-authored-by: Aaron Barnard <abarnard@protonmail.com>
Co-authored-by: Adam Carpenter <adamcarpenter86@gmail.com>
Co-authored-by: Arseniy Ivanov <138289+freeatnet@users.noreply.github.com>
Co-authored-by: Julie <julianapeace@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Taylor Dawson <taylorjdawson@gmail.com>
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