From ccdfea284a0a63c60e32b2fc9e736f69ecbb06ad Mon Sep 17 00:00:00 2001 From: Diego Cepeda Date: Mon, 15 Nov 2021 17:37:29 -0800 Subject: [PATCH] add max len to webhook context too long response (#653) --- src/iris/webhooks/webhook.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/iris/webhooks/webhook.py b/src/iris/webhooks/webhook.py index cd34145b..fea4bc52 100644 --- a/src/iris/webhooks/webhook.py +++ b/src/iris/webhooks/webhook.py @@ -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