From 8c04b22d798281ecf39a0f8bcd8cff370f7060e2 Mon Sep 17 00:00:00 2001 From: folbrich Date: Sun, 25 Jun 2023 19:35:38 +0200 Subject: [PATCH] Fix error type from HTTP stores --- remotehttp.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/remotehttp.go b/remotehttp.go index f0834f8..0caf783 100644 --- a/remotehttp.go +++ b/remotehttp.go @@ -216,6 +216,10 @@ func (r *RemoteHTTP) GetChunk(id ChunkID) (*Chunk, error) { p := r.nameFromID(id) b, err := r.GetObject(p) if err != nil { + // The base returns NoSuchObject, but it has to be ChunkMissing for routers to work + if _, ok := err.(NoSuchObject); ok { + return nil, ChunkMissing{id} + } return nil, err } return NewChunkFromStorage(id, b, r.converters, r.opt.SkipVerify)