Description
Summary
When you read an issue property and get a 404 response there are two reasons for that. From the documentation:
> Returned if the issue with given key or id does not exist, if the property with given key is not found, or if the user does not have permission to view the issue.
So there are two options:
1. Issue with given id or key does not exist:
{ "errorMessages": [ "Issue does not exist or you do not have permission to see it." ], "errors": {} }
2. Property with given key does not exist:
{ "errorMessages": [ "The property foobar does not exist." ], "errors": {} }
Jira should provide different HTTP error code for the two different cases or there should be an error code in the message that can be checked in code, independent of localization.
Background
I have an app that stores data in an issue property. I would like to handle these two cases differently and thought I could just distinguish based on the error message. However, there is a problem here. I just noticed that the error message is localized, as in one of my customers has his Jira configured in Spanish and the message says: "La propiedad foobar no existe."
This makes it practically impossible to distinguish the two cases unless you check for all possible languages that Jira offers.
Is this something Atlassian would consider to fix?
As posted also here: https://community.developer.atlassian.com/t/issue-property-404-response-too-general/17151
Attachments
Issue Links
- derived from
-
DEVHELP-1137 Loading...