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

fix: handle 404 errors, fix error handling for client.resolve #23

Merged
merged 1 commit into from
Sep 22, 2022

Conversation

yusefnapora
Copy link
Owner

This fixes a couple things related to error handling:

  • W3NameClient::resolve now actually checks the status code of the API response and returns errors
  • APIError now includes the HTTP status code
  • The cli now prints an error report to stderr on failure and calls process::exit instead of panicking
  • The cli's publish command now only falls back to creating an initial revision if the request for the current revision returns 404. Other errors are treated as failures and printed. Closes add better error handling for publish command #4

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.

add better error handling for publish command
1 participant