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

Test new version in fractal-containers #43

Open
tcompa opened this issue Oct 30, 2024 · 8 comments
Open

Test new version in fractal-containers #43

tcompa opened this issue Oct 30, 2024 · 8 comments

Comments

@tcompa
Copy link
Collaborator

tcompa commented Oct 30, 2024

@zonia3000
Copy link
Collaborator

Tested with ghcr.io/fractal-analytics-platform/fractal-vizarr-viewer:dev and it works as expected. I think that we can regenerate the stable Docker version too.

@tcompa
Copy link
Collaborator Author

tcompa commented Oct 30, 2024

@jluethi
Copy link

jluethi commented Nov 1, 2024

Is this how we show the errors? If we get those more explicit errors correctly, can we translate them to something users are more likely to understand.

For the 403: Do we know whether the user was logged in without access to that file or just not logged in for that? Can we display corresponding errors with the right hints about what to do?

@zonia3000
Copy link
Collaborator

Is this how we show the errors? If we get those more explicit errors correctly, can we translate them to something users are more likely to understand.

The error message is built inside the zarrita.js library.

https://github.com/manzt/zarrita.js/blob/f3f3a196cdc87bc31124b527b133f3f4f90f4f32/packages/storage/src/fetch.ts#L26

The status code is inserted inside the message. This means that when we receive the message in vizarr we have to parse the string to obtain the status code, which is feasible but not very elegant. It would be better to have a custom error class that contains also a status code field.

So, I can add some logic in our fork, but I don't know if that would be merged upstream, since it looks quite related to our specific needs: we can create custom error codes for status that we produce like 500, 404, 401 and 403, but what about all the other possible error codes?

For the 403: Do we know whether the user was logged in without access to that file or just not logged in for that? Can we display corresponding errors with the right hints about what to do?

The proper way to do this is returning 401 instead of 403 if the user is not logged in. No problem in adding this. It has to be ignored when AUTHORIZATION_SCHEME is set to none, which is the case where we support anonymous users.

@tcompa
Copy link
Collaborator Author

tcompa commented Nov 4, 2024

The proper way to do this is returning 401 instead of 403 if the user is not logged in. No problem in adding this. It has to be ignored when AUTHORIZATION_SCHEME is set to none, which is the case where we support anonymous users.

Let's start with this update.
Likely it will cover the most relevant cases.

@jluethi
Copy link

jluethi commented Nov 4, 2024

Sounds good! :)

@zonia3000
Copy link
Collaborator

Let's start with this update. Likely it will cover the most relevant cases.

Done in #47

@zonia3000
Copy link
Collaborator

Generated again the docker image ghcr.io/fractal-analytics-platform/fractal-vizarr-viewer:stable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants