Skip to content

Commit

Permalink
Return ErrBucketNotFound when getting object from non-existing stream
Browse files Browse the repository at this point in the history
Signed-off-by: Piotr Piotrowski <piotr@synadia.com>
  • Loading branch information
piotrpio committed Dec 15, 2023
1 parent eae2849 commit b306903
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions jetstream/object.go
Original file line number Diff line number Diff line change
Expand Up @@ -859,6 +859,9 @@ func (obs *obs) GetInfo(ctx context.Context, name string, opts ...GetObjectInfoO
if errors.Is(err, ErrMsgNotFound) {
err = ErrObjectNotFound
}
if errors.Is(err, ErrStreamNotFound) {
err = ErrBucketNotFound
}
return nil, err
}
var info ObjectInfo
Expand Down

0 comments on commit b306903

Please sign in to comment.