Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
r-birkner committed Oct 8, 2024
1 parent d48eecb commit d28a83c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions rs/boundary_node/ic_boundary/src/routes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ impl ErrorCause {
Self::Other(_) => ErrorClientFacing::Other,
Self::BodyTimedOut => ErrorClientFacing::BodyTimedOut,
Self::UnableToReadBody(x) => ErrorClientFacing::UnableToReadBody(x.clone()),
Self::PayloadTooLarge(x) => ErrorClientFacing::PayloadTooLarge(x.clone()),
Self::PayloadTooLarge(x) => ErrorClientFacing::PayloadTooLarge(*x),
Self::UnableToParseCBOR(x) => ErrorClientFacing::UnableToParseCBOR(x.clone()),
Self::UnableToParseHTTPArg(x) => ErrorClientFacing::UnableToParseHTTPArg(x.clone()),
Self::LoadShed => ErrorClientFacing::LoadShed,
Expand Down Expand Up @@ -275,7 +275,7 @@ impl ErrorClientFacing {
Self::LoadShed => "Reading the request body timed out due to data arriving too slowly.".to_string(),
Self::MalformedRequest(x) => x.clone(),
Self::NoHealthyNodes => "There are currently no healthy replica nodes available to handle the request. This may be due to an ongoing upgrade of the replica software in the subnet. Please try again later.".to_string(),
Self::Other => format!("Internal Server Error"),
Self::Other => "Internal Server Error".to_string(),
Self::PayloadTooLarge(x) => format!("Payload is too large: maximum body size is {x} bytes."),
Self::RateLimited => "Rate limit exceeded. Please slow down requests and try again later.".to_string(),
Self::ReplicaError => "An unexpected error occurred while communicating with the upstream replica node. Please try again later.".to_string(),
Expand Down
4 changes: 2 additions & 2 deletions rs/boundary_node/ic_boundary/src/routes/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ async fn test_middleware_validate_canister_request() -> Result<(), Error> {
// case 3: 'x-request-id' header contains an invalid uuid
#[allow(clippy::borrow_interior_mutable_const)]
let expected_failure =
format!("malformed_request: value of '{X_REQUEST_ID}' header is not in UUID format\n");
format!("error: malformed_request\ndetails: Unable to parse the request ID in the '{X_REQUEST_ID}': the value is not in UUID format");

let request = Request::builder()
.method("GET")
Expand Down Expand Up @@ -261,7 +261,7 @@ async fn test_middleware_validate_subnet_request() -> Result<(), Error> {
// case 3: 'x-request-id' header contains an invalid uuid
#[allow(clippy::borrow_interior_mutable_const)]
let expected_failure =
format!("malformed_request: value of '{X_REQUEST_ID}' header is not in UUID format\n");
format!("error: malformed_request\ndetails: Unable to parse the request ID in the '{X_REQUEST_ID}': the value is not in UUID format");

let request = Request::builder()
.method("GET")
Expand Down

0 comments on commit d28a83c

Please sign in to comment.