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 error handling to all api routes #148

Open
gemcoder21 opened this issue Mar 18, 2024 · 1 comment
Open

Add error handling to all api routes #148

gemcoder21 opened this issue Mar 18, 2024 · 1 comment
Labels
help wanted Extra attention is needed priority: medium

Comments

@gemcoder21
Copy link
Contributor

gemcoder21 commented Mar 18, 2024

We can extend endpoint like get_name_resolve, to return a custom error struct

#[get("/name/resolve/<name>?<chain>")]
pub async fn get_name_resolve(
    name: &str,
    chain: &str,
    name_client: &State<Mutex<NameClient>>,
) -> Result<Json<NameRecord>, NotFound<String>> {
...
}
@0xh3rman
Copy link
Collaborator

@gemcoder21 gemcoder21 added the help wanted Extra attention is needed label Jul 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed priority: medium
Projects
Status: 📋 Backlog
Development

No branches or pull requests

2 participants