Skip to content

Commit

Permalink
Internal error returns Unavailable
Browse files Browse the repository at this point in the history
  • Loading branch information
DanGould committed Oct 19, 2023
1 parent 2fbc22c commit f535666
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion payjoin/src/receive/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ impl fmt::Display for Error {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match &self {
Self::BadRequest(e) => e.fmt(f),
Self::Server(_) => crate::response_error::WellKnownError::Unavailable.fmt(f),
Self::Server(_) => write!(
f,
r#"{{ "errorCode": "unavailable", "message": "The payjoin endpoint is not available for now." }}"#
),
}
}
}
Expand Down

0 comments on commit f535666

Please sign in to comment.