-
Notifications
You must be signed in to change notification settings - Fork 166
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
[sharing-ng] status code for multiple mount and unmount share #8876
Comments
At the moment, multiple unmount request gives |
@S-Panta I added the PR and some tests have been affected. Please validate the test result and clarify what is the suitable response code (400 or 404) in the given scenarios ?
|
|
imo should be 404 as the shared resource gets deleted in those scenarios. |
But it collides with previous fix #8724 |
The bad request can only be the case if the value of
Here we enable sync where there is no resource shared. Thus, it should be 404. Are there any tests to cover the scenario where the id is in a weird format? @saw-jan |
No. Please don't. 400 was a bad idea. 404 in both cases is better I think. |
It would be great to keep the response codes in conformity. UPD:
|
Could there be problems with the fact that the proxy can cache 404? |
Describe the bug
Mounting the share multiple times results in
400
status code. BUt this request isn't a bad request but conflict in request and thus should be 409. As RFC states in https://datatracker.ietf.org/doc/html/rfc7231#section-6.5.8Same goes for unmounting share multiple times. At the moment, oCIS returns
424
failed dependency status code. MDN docs writesWhat are the appropriate status code for these two request?
Steps to reproduce
1.Login to ocis as
admin
2.create a folder
test
and share toeinstein
3. click disable sync.
4. Send API request to mount resource.
5. send the request again to mount resource
The text was updated successfully, but these errors were encountered: