Skip to content

[Bug] - Replace 500 Error code with 422 for Invalid Addresses #355

Description

@surbhit14

For routes like /avs/[address], if the address is a valid Ethereum address but not an AVS address
then we get a 500 error in response

{
  "error": {
    "code": "internal_server_error",
    "message": "An internal server error occurred. Please contact our support if the problem persists.",
    "doc_url": "https://docs.eigenexplorer.com/api-reference/errors#internal_server_error"
  }
}

This should be replaced with

{
    "error": {
        "code": "unprocessable_entity",
        "message": "invalid_string: Invalid AVS Address",
        "doc_url": "https://docs.eigenexplorer.com/api-reference/errors#unprocessable_entity"
    }
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions