diff options
Diffstat (limited to 'internal/storage/storage.go')
-rw-r--r-- | internal/storage/storage.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/internal/storage/storage.go b/internal/storage/storage.go index 508433c1a..5d5baf283 100644 --- a/internal/storage/storage.go +++ b/internal/storage/storage.go @@ -52,6 +52,12 @@ type PresignedURL struct { Expiry time.Time // link expires at this time } +// IsInvalidKey returns whether error is an invalid-key +// type error returned by the underlying storage library. +func IsInvalidKey(err error) bool { + return errors.Is(err, storage.ErrInvalidKey) +} + // IsAlreadyExist returns whether error is an already-exists // type error returned by the underlying storage library. func IsAlreadyExist(err error) bool { |