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: return a 400 error on invalid address #138

Merged
merged 1 commit into from
Aug 27, 2023
Merged

fix: return a 400 error on invalid address #138

merged 1 commit into from
Aug 27, 2023

Conversation

wa0x6e
Copy link
Contributor

@wa0x6e wa0x6e commented Aug 27, 2023

🧿 Current issues / What's wrong ?

When using submit a POST with an invalid address, it returns a 500 error.
User input error should throw a 400 error, and should not be logged as an error in the error monitoring system.

💊 Fixes / Solution

Fix #137
Fix SNAPSHOT-RELAYER-3

Fail early on invalid address, and return a 400 error

🚧 Changes

  • Check for address validity early, and fail with 400 code on invalid address
  • Do not log invalid address error on Sentry

🛠️ Tests

  • N/A

@wa0x6e wa0x6e requested a review from ChaituVR August 27, 2023 14:15
Copy link
Member

@ChaituVR ChaituVR left a comment

Choose a reason for hiding this comment

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

utAck

@wa0x6e wa0x6e merged commit 850824c into master Aug 27, 2023
2 checks passed
@ChaituVR ChaituVR deleted the fix-137 branch August 27, 2023 18:03
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.

Error: invalid address (argument="address", value="0x0", code=INVALID_ARGUMENT, version=address/5.7.0)
2 participants