Skip to content

Commit 1164440

Browse files
authored
Include status page URL in read-only mode error message (#10527)
1 parent 223ccc1 commit 1164440

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/tests/snapshots/crates_io__tests__read_only_mode__cannot_hit_endpoint_which_writes_db_in_read_only_mode.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ expression: response.json()
55
{
66
"errors": [
77
{
8-
"detail": "crates.io is currently in read-only mode for maintenance. Please try again later."
8+
"detail": "crates.io is currently in read-only mode. Please check https://status.crates.io/ for details and try again later."
99
}
1010
]
1111
}

src/util/errors.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ impl From<DieselError> for BoxedAppError {
147147
match err {
148148
DieselError::NotFound => not_found(),
149149
e if is_read_only_error(&e) => {
150-
let detail = "crates.io is currently in read-only mode for maintenance. Please try again later.";
150+
let detail = "crates.io is currently in read-only mode. Please check https://status.crates.io/ for details and try again later.";
151151
custom(StatusCode::SERVICE_UNAVAILABLE, detail)
152152
}
153153
DieselError::DatabaseError(DatabaseErrorKind::ClosedConnection, _) => {

0 commit comments

Comments
 (0)