-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reconsider status codes for DRU immutable and duplicate process responses #328
Comments
@pvretano @jerstlouis @gfenoy Thoughts about this? |
@fmigneault thanks a lot for pointing this out. I am in favour of this modifications and would be please to work on integrating them in this PR. |
Introduce fix for issue opengeospatial#328
@fmigneault I have integrated the modifications here: GeoLabs@dbac653#diff-6126b7f18b1eafbd6697a4be54ec5ec85dbbde6c71422940ff7d5bba582e95d6. Please confirm that it fixes the issue. |
@gfenoy |
Adjust adoc as needed
@fmigneault thanks your feedback. This time it should be fine. |
21-AUG-2023: Closed by #327. |
/req/deploy-replace-undeploy/deploy/response-duplicate
and/req/deploy-replace-undeploy/deploy/response-immutable
both use the same "error" code303 See Other
.This makes it impossible for a Web Client interacting with the API to properly handle the problem, because it could be any of the two errors. Futhermore, many clients automatically handle
3xx
codes by silently/automatically following the returned redirectLocation
, causing the final response toward an existing process to be200 OK
. This leads to potential confusion by the Web Client user (ie: the user deploys/deletes a process, gets an200 OK
, but the obtained process description is wrong/still defined). Also, theLocation
of the "other" process could point toward a resource that is unaccessible, due to security restrictions or limitations for the identified user performing the original request. This instead can cause Authentication 401 or 403 responses after following theLocation
, which is even less descriptive about the cause of the problem.In the case of a duplicate process,
409 Conflict
would be more relevant:In the case of an immutable process, the
403 Forbidden
operation would make more sense:On top of being more relevant codes to illustrate the error that occured, 4xx are actually classified as "Client Error".
Codes in the 3xx group are for redirections (aka the equivalent of 2xx but with an extra
Location
), which is misleading to indicate errors.The text was updated successfully, but these errors were encountered: