Skip to content

Commit

Permalink
add max len to webhook context too long response (#653)
Browse files Browse the repository at this point in the history
  • Loading branch information
diegocepedaw authored Nov 16, 2021
1 parent 66ce7b7 commit ccdfea2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/iris/webhooks/webhook.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ def validate_post(self, body):
def create_context(self, body):
context_json_str = ujson.dumps(body)
if len(context_json_str) > 65535:
logger.warn('POST to {} exceeded acceptable size'.format(self.__name__))
raise HTTPBadRequest('Context too long')
logger.warn('POST exceeded acceptable size of 65535 characters')
raise HTTPBadRequest('Context too long, must be < 65535 characters')

return context_json_str

Expand Down

0 comments on commit ccdfea2

Please sign in to comment.