One of our services panicked overnight due to an index out of range error. The offending code is in IntercomHTTPClient.parseResponseError, which expects errorList.Errors to have at least one entry. I'm not sure what the JSON payload was because it wasn't logged, but we seem to have gotten a response from the API which had status >= 400, contained valid JSON but had an empty errors array.
Steps to reproduce
None - seems to have been a once-off server response.
Version info
Expected behavior
No panic.
Actual behavior
One of our services panicked overnight due to an
index out of range
error. The offending code is inIntercomHTTPClient.parseResponseError
, which expectserrorList.Errors
to have at least one entry. I'm not sure what the JSON payload was because it wasn't logged, but we seem to have gotten a response from the API which had status >= 400, contained valid JSON but had an emptyerrors
array.Steps to reproduce
None - seems to have been a once-off server response.
Logs