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 Jan 12, 2024
1 parent d024bed commit ff8804c
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 ff8804c

Please sign in to comment.