From a493851a2ba19fe9bb0dd7fcd9c6d5c9fcbfe03c Mon Sep 17 00:00:00 2001 From: Frank Olbricht Date: Sat, 1 Jul 2023 01:09:15 +0200 Subject: [PATCH] Fix error type from HTTP stores (#239) --- 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)