Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Plugin Webhook 413 error

Marie Ritter August 24, 2016

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

3 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
Answer accepted
khanh
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 28, 2016

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

Marie Ritter August 29, 2016

Thank you, works great! I was looking for something like this but couldn't find it anywhere.

khanh
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 29, 2016

You can find all the options for the bodyParser in the docs here: https://github.com/expressjs/body-parser

0 votes
Marie Ritter August 24, 2016

@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.

0 votes
Robert Massaioli _Atlassian_
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 24, 2016

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:

  1. Making a HTTP request back to JIRA in response to the webhook and that is returning the 413 response code OR
  2. Your own service is returning a HTTP 413 response code to JIRA in response to the webhook.

Depending on the scenario changes the advice we should give to fix the issue. Which scenario is it? smile

TAGS
AUG Leaders

Atlassian Community Events