Skip to content

Commit

Permalink
return 502 instead of the original status code
Browse files Browse the repository at this point in the history
  • Loading branch information
shouya committed Aug 5, 2024
1 parent 172bc1f commit 82bdb59
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@ impl Error {
(status, format!("Fetch source error: {body}"))
}
Error::HttpStatus(status, url) => {
let body = format!("Error fetching {url}");
(status, body)
let body = format!("Error fetching {url}: {status}");
(StatusCode::BAD_GATEWAY, body)
}
_ => (StatusCode::INTERNAL_SERVER_ERROR, format!("{self}")),
}
Expand Down

0 comments on commit 82bdb59

Please sign in to comment.