Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Jira API Issue Notify Returning 500 Internal Server Error

Muammer Cakir
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 24, 2020

Hello,

I am currently developing an Jira Cloud Plugin. One functionality will be sending notifications to Jira users.

For that I am trying to call the endpoint POST /rest/api/3/issue/{issueIdOrKey}/notify with following Body:

{ 
"subject": "Test Email",
"textBody": "Body",
"htmlBody": "<h1>Body</h1>",
"to":
{
"voters": false,
"assignee": false,
"watchers": false,
"reporter": false,
"users": [{
"accountId": "5e4bb2c3c8ec310c955b7XXXX",
"active": true }],
"groups": null
}
}

The API is returning always following error:

{"errorMessages":["Internal server error"],"errors":{}}

How should I now what exactly the problem is? Is there a way to find it out? Or do I miss something in my request body?

1 answer

1 accepted

0 votes
Answer accepted
Dario B
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 26, 2020

Hello @Muammer Cakir ,

Welcome to the Atlassian Community!

---

EDITED:

After further investigation I can see that the problem is actually with your REST request body. 

Indeed in your body you have an invalid value for group

"groups": null 

 

Can you kindly confirm that sending below body works instead:

{ 
"subject": "Test Email", 
"textBody": "Body", 
"htmlBody": "<h1>Body</h1>", 
"to": 
  { "voters": false, 
    "assignee": true, 
    "watchers": false, 
    "reporter": true
  }
}

 

 

Also, since the correct status code to be returned should have been 400, I have created below bug in order to have this issue fixed:

 

Please vote for the above bug ticket and set yourself as a watcher so that you will be notified in case of any update/progress. The bug will be addressed according to the Atlassian Cloud bug fixing policy.

 

Cheers,
Dario

Muammer Cakir
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 16, 2020

@Dario B , thank you for the bug report :)

Like Dario B likes this
Dario B
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 17, 2020

You are very welcome @Muammer Cakir :) 

Have a nice weekend! 

Dario

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events