8000 GitHub - franciszabala/error-handling-actix-web
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

franciszabala/error-handling-actix-web

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Error Handling in Rust with Actix Web: Best Practices and Strategies

Code used in the blog post https://medium.com/@naveenkumarkarthigayan/error-handling-in-rust-with-actix-web-best-practices-and-strategies-551602086fd3

I wanted to learn Rust and I find trying to make codes work more engaging. One example I learned from this that Rust allows multiple impl blocks.

Fixes

Added this code to make it work

impl Error {
    pub fn get_status_code(&self) -> StatusCode {
        self.get_codes().0
    }

    ....
}

Created an apporximate folder structure based on errors were imported in main.rs

Acknowledgements

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0