Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would it be helpful to send a 429 here instead of what I presume is a 200?
also, these
response()
responses seem quite sparse. maybe we could help clue-in the browsers to what is happening?Do we expect the clients to heed this response and wait to send new logs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This API is currently used only by one modal and it shows the same error message whenever a request fails, so it's not needed today.
If the API gets used more in the future, using the correct response code and improving errors would be good.
No, users might click on the form again and if it fails, it would result in the same error.
Thinking about it now, the UX isn't great, but let's see how much it will be used before investing more time into it.