Fix 400 return code on SAF errors
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 92
- Forks
- 81
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 46
Description
Describe the bug
This is a complementary issue to https://github.com/zowe/api-layer/issues/3007
There is the mapping between SAF errors and http return codes with one specific handling for error 8/16/28 mapped to 400. It is the only one SAF error with distinguished return code with seemingly no specific reason. I suggest to unify the error mapping to 500.
Expected behavior
Return 500 as for the other SAF error messages as 400 should indicate malformed request rather than permissions issue
Details
- Version and build number: v3, v2
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at common-service-core/src/main/java/org/zowe/apiml/passticket/AbstractIRRPassTicketException.java around line 65 and inspect the SAF error-to-HTTP status mapping, especially errors 8, 16, and 28. Done means those SAF errors return HTTP 500 consistently with the other SAF errors rather than HTTP 400.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100