DEV Community

Discussion on: A Web App in Rust - 14 Error Handling

Collapse
direstrepo24 profile image
direstrepo24

Hi, excellent post, I have followed it step by step, but I got the following error in impl actix_web::error::ResponseError for ServerError, in self:
non-exhaustive patterns: & R2D2Error not covered
ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
the matched value is of type & ServerError, can you help me or do you have the github repo? Thanks

Collapse
direstrepo24 profile image
direstrepo24

I think I will solve it by implementing the missing error case: ServerError :: R2D2Error => HttpResponse :: InternalServerError (). json ("r2d2 error"), in the implementation of: impl actix_web :: error :: ResponseError for ServerError