mozilla-services / syncstorage-rs

Sync Storage server in Rust
Mozilla Public License 2.0
863 stars 46 forks source link

Improve From<ErrorKind> for Error #1583

Open data-sync-user opened 1 month ago

data-sync-user commented 1 month ago

(From the original https://github.com/mozilla-services/syncstorage-rs/issues/932 )

Mark's reflexive From for Error types in autoendpoint may make it easier to convert from lower level errors (like DbErrorKind) directly into higher level ApiErrors.

We may want to make failure_boilerplate!from_error! implement it for all types or only emit it for the higher level ApiError -- we can look at what autoendpoint does here as an example.

┆Issue is synchronized with this Jira Task