-
Notifications
You must be signed in to change notification settings - Fork 0
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
Review how vizarr works as of recent switch from zarr.js to zarrita.js #5
Comments
Here is the relevant vizarr PR: |
I did some tests using the new vizarr version based on zarrita.js. Zarrita.js has a async function handle_response(
response: Response,
): Promise<Uint8Array | undefined> {
if (response.status === 404 || response.status === 403) {
return undefined;
}
if (response.status === 200 || response.status === 206) {
return new Uint8Array(await response.arrayBuffer());
}
throw new Error(
`Unexpected response status ${response.status} ${response.statusText}`,
);
} However the function treats in the same way the
So, we could proceed with this new version, modifying only vizarr to display the error message, but considering that both for 404 and for 403 we will have the following message:
An alternative would be, in fractal-data, to use a non standard error code to notify the Forbidden case. It could be a generic 400 Bad Request or a 401 Unauthorized. In that case the error message will be:
|
In #15 I've added the changes for using the newer vizarr version, that also switched from Moreover the vizarr output folder is now called |
No further activity needed on this one, for the moment. We are aware that the error message may be suboptimal - as described above. |
The obvious question is whether a patch similar to gzuidhof/zarr.js#151 would be needed for zarrita.js as well.
The text was updated successfully, but these errors were encountered: