Skip to content
This repository has been archived by the owner on Jul 13, 2023. It is now read-only.

Report invalid subscription_ids more specifically #578

Closed
benlast opened this issue Aug 2, 2016 · 1 comment
Closed

Report invalid subscription_ids more specifically #578

benlast opened this issue Aug 2, 2016 · 1 comment
Assignees
Labels

Comments

@benlast
Copy link

benlast commented Aug 2, 2016

In testing error responses from autopush, we modified valid subscription endpoint URLs (e.g., https://updates-autopush.stage.mozaws.net/wpush/v1/gAAAAABXm9zL46k0BF-HXEwueq...) by altering one character of the last component (beginning gAAAAA...). The intention was to prompt a 410 GONE or 404 NOT FOUND response, specific to that token. Instead we got a 400 BAD REQUEST, with no content or other explanation.

Since there are a number of cases that can cause an "empty" (no content) 400 response (mostly meaning that the headers for the POST are not correct), our application server code isn't able to interpret the 400 as meaning the subscription_id is incorrect, so it remains in our system, eligible to have future messages sent.

It would be preferable if either the response status code were 410 or 404, or if a specific message could be included in the content to explain why the 400 response was generated.

@bbangert bbangert self-assigned this Aug 18, 2016
@bbangert bbangert added this to the PUSHSVC-0: quality milestone Aug 18, 2016
@bbangert
Copy link
Member

Indeed, the URL token failed to process, which resulted in an error in the request. As you mention though, since this is the URL failing to validate, the error should be a 410, not a 400, and a 400 should definitely have content with a errno.

bbangert added a commit that referenced this issue Aug 18, 2016
URL's that are invalid should return a 404, just like any other
invalid URL.

Closes #578
bbangert added a commit that referenced this issue Aug 18, 2016
URL's that are invalid should return a 404, just like any other
invalid URL.

Closes #578
bbangert added a commit that referenced this issue Aug 18, 2016
URL's that are invalid should return a 404, just like any other
invalid URL.

Closes #578
bbangert added a commit that referenced this issue Aug 18, 2016
URL's that are invalid should return a 404, just like any other
invalid URL.

Closes #578
bbangert added a commit that referenced this issue Aug 18, 2016
URL's that are invalid should return a 404, just like any other
invalid URL.

Closes #578
bbangert added a commit that referenced this issue Aug 18, 2016
URL's that are invalid should return a 404, just like any other
invalid URL.

Closes #578
bbangert added a commit that referenced this issue Aug 18, 2016
URL's that are invalid should return a 404, just like any other
invalid URL.

Closes #578
bbangert added a commit that referenced this issue Aug 18, 2016
URL's that are invalid should return a 404, just like any other
invalid URL.

Closes #578
bbangert added a commit that referenced this issue Aug 18, 2016
URL's that are invalid should return a 404, just like any other
invalid URL.

Closes #578
bbangert added a commit that referenced this issue Aug 19, 2016
URL's that are invalid should return a 404, just like any other
invalid URL.

Closes #578
bbangert added a commit that referenced this issue Aug 19, 2016
URL's that are invalid should return a 404, just like any other
invalid URL.

Closes #578
bbangert added a commit that referenced this issue Aug 19, 2016
URL's that are invalid should return a 404, just like any other
invalid URL.

Closes #578
bbangert added a commit that referenced this issue Aug 19, 2016
URL's that are invalid should return a 404, just like any other
invalid URL.

Closes #578
bbangert added a commit that referenced this issue Aug 19, 2016
URL's that are invalid should return a 404, just like any other
invalid URL.

Closes #578
bbangert added a commit that referenced this issue Aug 19, 2016
URL's that are invalid should return a 404, just like any other
invalid URL.

Closes #578
bbangert added a commit that referenced this issue Aug 19, 2016
URL's that are invalid should return a 404, just like any other
invalid URL.

Closes #578
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants