Skip to content

Commit bbd67ff

Browse files
tomusdrwTyera Eulberg
authored andcommitted
Remove non-json from health message. (paritytech#332)
1 parent c92a5d4 commit bbd67ff

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

http/src/response.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ impl Response {
4242
Response {
4343
code: StatusCode::SERVICE_UNAVAILABLE,
4444
content_type: HeaderValue::from_static("application/json; charset=utf-8"),
45-
content: format!("Service Unavailable: {}", msg.into()),
45+
content: format!("{}", msg.into()),
4646
}
4747
}
4848

http/src/tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ fn should_handle_health_endpoint_failure() {
179179

180180
// then
181181
assert_eq!(response.status, "HTTP/1.1 503 Service Unavailable".to_owned());
182-
assert_eq!(response.body, "Service Unavailable: {\"code\":-34,\"message\":\"Server error\"}\n");
182+
assert_eq!(response.body, "{\"code\":-34,\"message\":\"Server error\"}\n");
183183
}
184184

185185
#[test]

0 commit comments

Comments
 (0)