Skip to content

Commit

Permalink
set static status code
Browse files Browse the repository at this point in the history
becuase its BAD_REQEUST  if there is no json
  • Loading branch information
89Q12 committed Jun 9, 2022
1 parent ddafb7b commit 644afea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/endpoints.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ async fn post_json(endpoint: &str, data: Value, client_config : &ClientConfig) -
tracing::error!("Failed to extract json from response: {:?}", e);
return Err(RequestError{
message: e.to_string(),
status: e.status().unwrap(),
status: StatusCode::BAD_REQUEST,
endpoint: endpoint.to_string(),
request_data: data,
})},
Expand Down

0 comments on commit 644afea

Please # to comment.