Forums

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

Jira Rest API :: Empty response is return if we Find users by invalid username / invalid accountId

AppConnect April 8, 2020

Hi,


We are trying to develop an application using JIRA Rest APIs.

We are trying to find user by username/accountId.

But if we provide invalid username/accountId, instead of error we are getting empty array with statusCode 200.

Is there any way to trace the error as this is not valid behavior and user might not able to trace out whether the request is successful or not.

Instance : On Cloud

Following is the req:

var options = {
'method': 'GET',
'url': '{{host}}/rest/api/2/user/search?username=invaliduser',
'headers': {
'Accept': 'application/json',
'Content-Type': 'application/json',
'Authorization': Basic username:password
}
};

 

Following response is getting from endpoint:

StatusCode : 200

Body: []

 

Note : API behavior is same for OnPrem instance

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events