arussellsaw/telemetry

HTTP Reporter statuses

Closed this issue · 0 comments

The HTTP reporter currently always reports the status as 200 OK, when it should use the following:

  • 200 OK When everything is OK and there is data in the response
  • 204 No Content When everything is OK but there is no data to be reported
  • 500 Server Error When the server screws up and can't create the response.

In addition, if there is an error, it should be reported within a JSON object, with a format similar to the following:

{"error" : "The error message goes here."}

This way the client will still be able to parse the response body if there is an error, but can also use the status code to determine if it wants to read the response body.