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

add better error handling for invalid client URLs #388

Merged
merged 3 commits into from May 13, 2022

Conversation

khancode
Copy link
Collaborator

@khancode khancode commented May 11, 2022

High Level Overview of Change

Add better error handling for invalid client URLs.

Context of Change

If you put in the wrong URL of a node for a client, the error that it returns is super opaque (it's a JSONDecodeError). We should return a better error/error message, so that it's clear that the user entered the wrong URL for the node.

This change now raises an XRPLRequestFailureException if the response can't be JSON decoded (JSONDecodeError).

#353

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactor (non-breaking change that only restructures code)
  • Tests (You added tests for code that already exists, or your new feature included in this PR)
  • Documentation Updates
  • Release

Test Plan

Added unit tests.

@khancode khancode requested a review from JST5000 May 12, 2022 18:14
@khancode khancode requested a review from JST5000 May 13, 2022 19:38
Copy link
Collaborator

@JST5000 JST5000 left a comment

Choose a reason for hiding this comment

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

LGTM

@khancode khancode merged commit 5acfc99 into master May 13, 2022
@khancode khancode deleted the handle-invalid-url branch May 13, 2022 20:22
@khancode khancode mentioned this pull request May 13, 2022
7 tasks
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.

None yet

4 participants