diff --git a/.travis.yml b/.travis.yml index 82a09781..813fe4fa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,3 +14,6 @@ after_success: notifications: slack: secure: LE+1Nelh5PLrb35LU6yJI1EV2LDVm4V90Tb+5LhUpeGrcfqr47HhMLMGXbBSnnjYPRLCiT75xog+oMN5eAF4VnZle4qza6Ue7G+YwRtGo/V0ud0i2zSUT557yXcr2QCYAzTKJVgetnxQNYvru/l1trdNZsRbsPUm1vexAjaX5yo= +addons: + hosts: + - travis.dev diff --git a/autopush/tests/test_integration.py b/autopush/tests/test_integration.py index d56b1c1c..02514113 100644 --- a/autopush/tests/test_integration.py +++ b/autopush/tests/test_integration.py @@ -1318,7 +1318,7 @@ def test_with_key(self): yield client.send_notification( vapid=vapid, - status=400) + status=404) yield self.shut_down(client) diff --git a/autopush/web/validation.py b/autopush/web/validation.py index 36c74e4b..ef4a29e9 100644 --- a/autopush/web/validation.py +++ b/autopush/web/validation.py @@ -199,7 +199,7 @@ def extract_subscription(self, d): ckey_header=d["ckey_header"], ) except (InvalidTokenException, InvalidToken): - raise InvalidRequest("invalid token", errno=102) + raise InvalidRequest("invalid token", status_code=404, errno=102) return result @validates_schema(skip_on_field_errors=True) diff --git a/docs/http.rst b/docs/http.rst index 424ffbad..611a4b07 100644 --- a/docs/http.rst +++ b/docs/http.rst @@ -89,7 +89,6 @@ Unless otherwise specified, all calls return the following error codes: - 400 - Bad Parameters - errno 101 - Missing neccessary crypto keys - - errno 102 - Invalid URL endpoint - errno 108 - Router type is invalid - errno 110 - Invalid crypto keys specified - errno 111 - Missing Required Header @@ -103,6 +102,10 @@ Unless otherwise specified, all calls return the following error codes: - errno 109 - Invalid authentication +- 404 - Not Found + + - errno 102 - Invalid URL endpoint + - 410 - `{UAID}` or `{CHID}` not found - errno 103 - Expired URL endpoint