|
|
|
@ -52,6 +52,21 @@ impl ResponseError for Error {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl std::error::Error for Error {
|
|
|
|
|
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
|
|
|
|
|
match self {
|
|
|
|
|
Error::BadToken(e) => Some(e),
|
|
|
|
|
Error::Crypto(e) => Some(e),
|
|
|
|
|
Error::Database(e) => Some(e),
|
|
|
|
|
Error::Invalid(e) => Some(e),
|
|
|
|
|
Error::Io(e) => Some(e),
|
|
|
|
|
Error::MalformedHeader(e) => Some(e),
|
|
|
|
|
Error::Reqwest(e) => Some(e),
|
|
|
|
|
_ => None,
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl fmt::Display for Error {
|
|
|
|
|
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
|
|
|
|
match self {
|
|
|
|
|