gzuidhof / zarr.js

Javascript implementation of Zarr
https://guido.io/zarr.js
Apache License 2.0
132 stars 23 forks source link

Propagated HTTP errors in HTTPStore containsItem function #151

Open zonia3000 opened 6 months ago

zonia3000 commented 6 months ago

Hello,

I'm working on a prototype using zarr.js and an authenticated backend. It would be very useful to be able to distinguish between 200, 404 and "something else" HTTP statuses inside the containsItem() function of the HTTPStore, so that one can catch the HTTPError and display a proper error message to the user.

I see that the getItem() function already considers these 3 cases, so I think that the same logic could be applied to containsItem().

Note: I'm working on Fractal project with @jluethi and @tcompa