diff --git a/NEXT_CHANGELOG.md b/NEXT_CHANGELOG.md index ccf5c94d48..3b52a95996 100644 --- a/NEXT_CHANGELOG.md +++ b/NEXT_CHANGELOG.md @@ -57,6 +57,12 @@ Move the location of the `text` field when exposing the query plan and fill it w By [@bnjjj](https://github.com/bnjjj) in https://github.com/apollographql/router/pull/1557 +### Fix typo on HTTP errors from subgraph ([#1593](https://github.com/apollographql/router/pull/1593)) + +Remove the closed parenthesis at the end of error messages resulting from HTTP errors from subgraphs. + +By [@nmoutschen](https://github.com/nmoutschen) in https://github.com/apollographql/router/pull/1593 + ## 🛠 Maintenance ## 📚 Documentation diff --git a/apollo-router/src/services/subgraph_service.rs b/apollo-router/src/services/subgraph_service.rs index 21de461eac..abf23285f5 100644 --- a/apollo-router/src/services/subgraph_service.rs +++ b/apollo-router/src/services/subgraph_service.rs @@ -201,7 +201,7 @@ impl tower::Service for SubgraphService { return Err(BoxError::from(FetchError::SubrequestHttpError { service: service_name.clone(), reason: format!( - "subgraph HTTP status error '{}': {})", + "subgraph HTTP status error '{}': {}", parts.status, String::from_utf8_lossy(&body) ), @@ -475,7 +475,7 @@ mod tests { .unwrap_err(); assert_eq!( err.to_string(), - "HTTP fetch failed from 'test': subgraph HTTP status error '400 Bad Request': BAD REQUEST)" + "HTTP fetch failed from 'test': subgraph HTTP status error '400 Bad Request': BAD REQUEST" ); }