Skip to content

Commit

Permalink
Fix error type from HTTP stores (#239)
Browse files Browse the repository at this point in the history
  • Loading branch information
folbricht authored Jun 30, 2023
1 parent 4d48f59 commit a493851
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions remotehttp.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit a493851

Please sign in to comment.