Search for issues using JQL enhanced search (POST) returns a response with code 400 instead of 404 in case any of the ids provided in reconcileIssues were not found

For the request POST /rest/api/3/search/jql we receive a response with the status 400 Bad Request and the body {"errorMessages": ["Couldn't find issues by id [...]."], "errors": {}} when reconcileIssues include deleted items.
According to the documentation, the response should have the code 404.
For reference, response headers from 2025-02-19T12:14:42.034Z:

Atl-Traceid: 47eba74c10514ad999d11442038abe12
X-Arequestid: 6b067b943ff2031ea7631640feb051b2

Overall, this behavior forces us to retry, which leads to an increase in the overall number of requests to JIRA. It seems that since the query specification is JQL, the absence of issues listed in reconcileIssues should not result in an error.

2 Likes

Hey @SemyonGashchenko , thanks for rising this problem. You’re right; this is a bug, and you can track it here.

additionally, your question highlights another issue: currently, there is no easy way to enforce the reconciliation flow for deleted issues. I have suggested a simplification to address this."-> https://jira.atlassian.com/browse/JRACLOUD-93328

1 Like

Hi, @glewandowski! Great! Thank you!