Hi,
I'm developing a plugin for JIRA with atlassian-connect-express using a cloud development instance. I created a webhook that reacts when an issue is updated in JIRA. This works fine when e.g. the summary of the issue changes. However, if the issue changes its status (doing a transition), I get the error "request entity too large" (HTTP status code 413). I've searched for the error and found that it is related to the nginx configuration (client_max_body_size property) but I couldn't find this property anywhere in the code. I couldn't find any posts related to doing a transition or webhooks either. I would like to extract some information from the request but this is not possible because of the error. Does anybody have a solution for this?
Best regards
Marie
Community moderators have prevented the ability to post new answers.
Hi @Marie Ritter,
It might be due to the express.bodyParser's limit which defaults 100kb. You can try increasing the limit in app.js to see if this fixes the problem.
app.use(bodyParser.json({limit: '50mb'})); app.use(bodyParser.urlencoded({limit: '50mb', extended: false}));
I hope this helps,
Khanh
Thank you, works great! I was looking for something like this but couldn't find it anywhere.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can find all the options for the bodyParser in the docs here: https://github.com/expressjs/body-parser
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Robert Massaioli I think it is the second one. My webhook looks like this:
app.post('/issue-updated', addon.authenticate(), function (req, res) { console.log(req.body.changelog); });
However, I don't see an output, just the 413 error.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The HTTP 413 code is a response code. Webhooks are POSTed to your add-on and they are HTTP requests; they cannot contain status response codes. To me, this suggests that you are either:
Depending on the scenario changes the advice we should give to fix the issue. Which scenario is it?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.