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

Headers key not present in validation #604

Closed
bbangert opened this issue Aug 17, 2016 · 0 comments
Closed

Headers key not present in validation #604

bbangert opened this issue Aug 17, 2016 · 0 comments
Assignees
Labels

Comments

@bbangert
Copy link
Member

Somehow the headers key was missing from validation per a traceback on sentry.

KeyError: 'headers'
  File "twisted/python/threadpool.py", line 246, in inContext
    result = inContext.theWork()
  File "twisted/python/threadpool.py", line 262, in <lambda>
    inContext.theWork = lambda: context.call(ctx, func, *args, **kw)
  File "twisted/python/context.py", line 118, in callWithContext
    return self.currentContext().callWithContext(ctx, func, *args, **kw)
  File "twisted/python/context.py", line 81, in callWithContext
    return func(*args,**kw)
  File "autopush/web/validation.py", line 59, in _validate_request
    return schema.load(data)
  File "marshmallow/schema.py", line 542, in load
    result, errors = self._do_load(data, many, partial=partial, postprocess=True)
  File "marshmallow/schema.py", line 627, in _do_load
    field_errors=field_errors)
  File "marshmallow/schema.py", line 835, in _invoke_validators
    pass_original=pass_original)
  File "marshmallow/marshalling.py", line 182, in run_validator
    res = validator_func(output)
  File "autopush/web/validation.py", line 270, in ensure_encoding_with_data
    if d["body"] and not all([x in d["headers"] for x in req_fields]):
@bbangert bbangert added the bug label Aug 17, 2016
@bbangert bbangert added this to the PUSHSVC-0: quality milestone Aug 17, 2016
@bbangert bbangert changed the title Headers key not present Headers key not present in validation Aug 17, 2016
@jrconlin jrconlin self-assigned this Aug 17, 2016
jrconlin added a commit that referenced this issue Aug 17, 2016
marshmallow may be more "helpful" than we'd like.

Closes #604
@jrconlin jrconlin removed the ready label Aug 17, 2016
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