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

Raise an exception in db methods missing conditional bindings #528

Closed
bbangert opened this issue Jul 17, 2016 · 2 comments
Closed

Raise an exception in db methods missing conditional bindings #528

bbangert opened this issue Jul 17, 2016 · 2 comments
Assignees
Labels

Comments

@bbangert
Copy link
Member

bbangert commented Jul 17, 2016

AWS will raise a ValidationError if an expression condition binds an argument that isn't included. register_user has this issue, likely from a GCM related call in endpoint.py as we had the error raised on stage at exactly the same time as a GCM error.

To ensure we don't miss arg's like this again, in addition to verifying endpoint.py is always passing them, all db methods in db.py should raise an Exception if they use a bounded expression condition for a variable that isn't in the object being passed in.

@bbangert bbangert added this to the PUSHSVC-0: quality milestone Jul 17, 2016
@bbangert bbangert added the bug label Jul 17, 2016
@jrconlin jrconlin self-assigned this Jul 18, 2016
@jrconlin
Copy link
Member

db.py register_user is wrapped with a try handler, but it only catches ConditonalCheckFailedException. This exception should propagate up. To mitigate the problem sentry notes with registration, we can have register_user return early if "router_type" or "connected_at" are not specified. This would preserve existing behavior.

Resolving endpoint call logic.

@bbangert bbangert added the p1 label Jul 19, 2016
@jrconlin
Copy link
Member

closed w/ #532

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