Skip to content
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

VOSpaceClient throws IllegalStateException for unauthorized calls #89

Open
at88mph opened this issue Dec 8, 2020 · 1 comment
Open
Labels

Comments

@at88mph
Copy link
Member

at88mph commented Dec 8, 2020

If a user attempts to create a folder or upload a file into a VOSpace to which they are not authorized to do so, the client will throw an IllegalStateException and a 500 Server Error, which is inappropriate.

The server logs from the service that the client was connecting to correctly report the unauthorized error:
PermissionDenied (401): Write permission denied on ...

But the client interprets it as an IllegalStateException.

@pdowler
Copy link
Member

pdowler commented Nov 17, 2022

This is probably in the VOSpaceAuthorizer (hope so) and should be an AccessControlException (403).

Alternatively, a check for write permission vs anon could be a NotAuthenticatedException (401), which might help a client take action and move forward.

@pdowler pdowler added the bug label Nov 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants