Skip to content

Commit

Permalink
Make node status report succeed on any 20x HTTP code.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sventimir committed Jan 26, 2024
1 parent 5d550a7 commit e7243b1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/lib/node_status_service/node_status_service.ml
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,10 @@ let send_node_status_data ~logger ~url node_status_data =
let metadata =
[ ("data", node_status_json); ("url", `String (Uri.to_string url)) ]
in
if Cohttp.Code.code_of_status status = 200 then
[%log info] "Sent node status data to URL $url" ~metadata
if
Cohttp.Code.(
code_of_status status >= 200 && code_of_status status < 300)
then [%log info] "Sent node status data to URL $url" ~metadata
else
let extra_metadata =
match body with
Expand Down

0 comments on commit e7243b1

Please sign in to comment.