#45851 closed defect (bug) (wontfix)
Http Status Codes are too much generic
Reported by: | astronati | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 5.0 |
Component: | Taxonomy | Keywords: | |
Focuses: | rest-api | Cc: |
Description
The status code should be used in the appropriate way.
The link above shows when the status code does not match the error. Here we should expect to see 409 and not 400
Change History (8)
#1
@
6 years ago
- Summary changed from Http Status Code are too much generic to Http Status Codes are too much generic
#2
@
6 years ago
- Component changed from General to Taxonomy
- Focuses rest-api added
- Resolution set to wontfix
- Severity changed from blocker to normal
- Status changed from new to closed
- Version changed from 5.0.2 to 5.0
#3
@
6 years ago
@TimothyBlynJacobs I'm reading the change was done to match a "consistency". Is it clear that for any client that receives that error there is no way to understand the real problem?
What should client do when receive the 400? At this point it should try to perform a non deterministic number of calls trying to guess the real reason.
I don't see why that decision was made. Could you give us more information please? Thanks
#4
@
6 years ago
@danielbachhuber The original ticket was approved by you.
Could you please read my comment? I would like to understand better the reason why you approved that case.
Thanks
#5
follow-up:
↓ 6
@
6 years ago
Sure! The idea is to instead look at the code in the error response body. In this case term_exists
.
{ "code": "term_exists", "message": "A term with the name provided already exists in this taxonomy.", "data": { "status": 400, "term_id": 22 } }
#6
in reply to:
↑ 5
@
6 years ago
Thanks @TimothyBlynJacobs
Is there a list where I can find all internal error codes?
Thanks
Replying to TimothyBlynJacobs:
Sure! The idea is to instead look at the code in the error response body. In this case
term_exists
.
{ "code": "term_exists", "message": "A term with the name provided already exists in this taxonomy.", "data": { "status": 400, "term_id": 22 } }
This was intentionally changed from a 409 in #42781.