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

Require a router_type to validate a record in the endpoint #1058

Closed
bbangert opened this issue Oct 24, 2017 · 3 comments
Closed

Require a router_type to validate a record in the endpoint #1058

bbangert opened this issue Oct 24, 2017 · 3 comments
Assignees
Labels

Comments

@bbangert
Copy link
Member

Per https://sentry.prod.mozaws.net/operations/autopush-prod/issues/671942/ we should require a router_type in the record or drop it.

Traceback:

KeyError: None
  File "twisted/internet/defer.py", line 653, in _runCallbacks
    current.result = callback(current.result, *args, **kw)
  File "autopush/web/base.py", line 222, in _validation_err
    fail.trap(InvalidRequest)
  File "twisted/python/failure.py", line 359, in trap
    self.raiseException()
  File "twisted/internet/defer.py", line 653, in _runCallbacks
    current.result = callback(current.result, *args, **kw)
  File "autopush/web/base.py", line 258, in _boto_err
    fail.trap(BotoServerError)
  File "twisted/python/failure.py", line 359, in trap
    self.raiseException()
  File "twisted/internet/defer.py", line 653, in _runCallbacks
    current.result = callback(current.result, *args, **kw)
  File "autopush/web/base.py", line 250, in _overload_err
    fail.trap(ProvisionedThroughputExceededException)
  File "twisted/python/failure.py", line 359, in trap
    self.raiseException()
  File "twisted/internet/defer.py", line 653, in _runCallbacks
    current.result = callback(current.result, *args, **kw)
  File "autopush/web/base.py", line 76, in _call_func
    return func(request_handler, **output_kwargs)
  File "autopush/web/webpush.py", line 496, in post
    router = self.routers[router_type]
@pjenvey
Copy link
Member

pjenvey commented Oct 24, 2017

websocket already does this check before validating the current month, it just needs to be brought over to WebPushHandler's validation

@bbangert
Copy link
Member Author

The webpush handler validation does it as well, as long as router_type exists and is set to 'webpush'.

@bbangert
Copy link
Member Author

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