A BadRequest response from the API logs `authorization failed...`
Czechh opened this issue ยท 3 comments
Czechh commented
Expected Behavior
On a BadParam Error from the API, don't log that there is an authorization failure.
Actual Behavior
On a BadParam Error from the API we log the following line https://github.com/DataDog/datadog-lambda-js/blob/main/src/metrics/api.ts#L28 - as this check puts the response in the same bucket https://github.com/DataDog/datadog-lambda-js/blob/main/src/utils/request.ts#L56.
So the request is rejected with a BadAuth
Steps to Reproduce the Problem
- Turn on debug mode
- Send a malformed metric
- Check the logs
Specifications
- Datadog Lambda Layer version: 3.49.1
- Node version: 14.x
nhinsch commented
๐