Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not handled error response codes by BatchDataSender #287

Open
Sidburse opened this issue May 11, 2022 · 3 comments
Open

Not handled error response codes by BatchDataSender #287

Sidburse opened this issue May 11, 2022 · 3 comments

Comments

@Sidburse
Copy link

Sidburse commented May 11, 2022

Response codes 400, 403, 404, 405 and 411 are not handled separately by the BatchDataSender. Instead a common DiscardBatchException is thrown to handle these response codes.

Also, is there a New Relic validation endpoint that can be accessed to test validity of credentials while accessing New Relic?

(Migrate to Jira)

@kford-newrelic
Copy link

@Sidburse thanks for letting us know about this issue - what's the impact of this issue on what you're trying to accomplish?

Not sure whether there's an endpoint specifically for credential testing but will check...

@Sidburse
Copy link
Author

@kford-newrelic I'm writing a piece of code to validate New Relic credentials (API key). For this I'm sending a test metric via the MetricBatchSender sendBatch() function which returns Response code returned by the Ingest API by making a call to the BatchDataSender sendPayload() function.
For invalid API key, the ingest API is expected to return a response code of '403-Forbidden request'. However, the cases for response codes 400, 403, 404, 405 and 411 are not handled individually and instead a common DiscardBatchException is thrown to handle these response codes. As response code 403 is not being returned by the function, I'm not able to handle that case for validating New Relic credentials.

@kford-newrelic kford-newrelic added this to Triage in Java Engineering Board via automation Jun 15, 2022
@kford-newrelic kford-newrelic added Q3 SC and removed Q3 SC labels Sep 8, 2022
@workato-integration
Copy link

@workato-integration workato-integration bot changed the title Not handled error response codes by BatchDataSender Not handled error response codes by BatchDataSender Sep 30, 2022
@kford-newrelic kford-newrelic removed this from Triage in Java Engineering Board Sep 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants