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)