Skip to content

Commit

Permalink
Update opentelemetry HTTP server to return deserialisation error mess…
Browse files Browse the repository at this point in the history
…age in non-ok handling cases

Signed-off-by: Stewart Webb <[email protected]>
  • Loading branch information
nuclearpidgeon committed Jun 15, 2024
1 parent 2d2e931 commit dbd4997
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion plugins/in_opentelemetry/opentelemetry_prot.c
Original file line number Diff line number Diff line change
Expand Up @@ -2461,7 +2461,12 @@ int opentelemetry_prot_handle_ng(struct flb_http_request *request,
send_export_service_response_ng(response, result, payload_type);
}
else {
send_response_ng(response, context->successful_response_code, NULL);
if (result == 0) {
send_response_ng(response, context->successful_response_code, NULL);
}
else {
send_response_ng(response, 400, "invalid request: deserialisation error\n");
}
}

return result;
Expand Down

0 comments on commit dbd4997

Please sign in to comment.