Skip to content

Implement custom error type #2

@Shadow53

Description

@Shadow53
  • Allows attaching an error message to an HTTP status code
  • Implements std::error::Error
  • Implements std::fmt::Display
    • Returns the actual error message
  • Implements warp::reject::Reject
  • Separate method for determining the error message to send back to client
    • If status >= 500, use a generic message rather than the actual error text
    • If status >= 400 && status < 500 use the actual error message

Note: May use an external library for this. I am considering implementing this as part of Nebula as its own crate that we can use here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions