diff --git a/src/main/java/dev/zarr/zarrjava/v3/Array.java b/src/main/java/dev/zarr/zarrjava/v3/Array.java index bbe97bf..631ef70 100644 --- a/src/main/java/dev/zarr/zarrjava/v3/Array.java +++ b/src/main/java/dev/zarr/zarrjava/v3/Array.java @@ -212,7 +212,7 @@ boolean chunkIsInArray(long[] chunkCoords) { public ucar.ma2.Array readChunk(long[] chunkCoords) throws ZarrException { if (!chunkIsInArray(chunkCoords)) { - return metadata.allocateFillValueChunk(); + throw new ZarrException("Attempting to read data outside of the array's domain."); } final String[] chunkKeys = metadata.chunkKeyEncoding.encodeChunkKey(chunkCoords);