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

feat: add events api exception message #213

Merged
merged 2 commits into from
Nov 1, 2024

Conversation

subzero10
Copy link
Member

@subzero10 subzero10 commented Nov 1, 2024

Status

READY

Description

Closes #210.

Todos

  • Tests

@subzero10 subzero10 self-assigned this Nov 1, 2024
@subzero10 subzero10 requested a review from stympy November 1, 2024 15:48
@stympy
Copy link
Member

stympy commented Nov 1, 2024

There is more than one possible exceptional response. The non-201 responses are as follows:

  • 403 - Unauthorized (the API key is invalid or Insights ingestion has been disabled)
  • 422 - The payload could not be processed, either because it is malformed or because it is too large
  • 429 - The daily quota has been exceeded

@subzero10
Copy link
Member Author

There is more than one possible exceptional response. The non-201 responses are as follows:

  • 403 - Unauthorized (the API key is invalid or Insights ingestion has been disabled)
  • 422 - The payload could not be processed, either because it is malformed or because it is too large
  • 429 - The daily quota has been exceeded

We have all of those already, but are shared between errors api and events api.
This PR introduces separate messages for the 429 code.
events api:

  • You have hit your events rate limit.

errors api (this one already existed):

  • You have hit your exception rate limit.

You can take a look at all of them here.

@stympy
Copy link
Member

stympy commented Nov 1, 2024

Got it, thanks.

@subzero10 subzero10 merged commit e0a0b90 into master Nov 1, 2024
18 checks passed
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

Successfully merging this pull request may close these issues.

Add new exception messages when throwing exceptions for the events api
2 participants