mirror of
https://github.com/dutchcoders/transfer.sh.git
synced 2024-11-23 20:50:18 +01:00
handle obscure Errors properly
This commit is contained in:
parent
b7deec505b
commit
8bb5094ccc
2 changed files with 3 additions and 1 deletions
1
go.mod
1
go.mod
|
@ -26,6 +26,7 @@ require (
|
||||||
github.com/skip2/go-qrcode v0.0.0-20191027152451-9434209cb086
|
github.com/skip2/go-qrcode v0.0.0-20191027152451-9434209cb086
|
||||||
github.com/tomasen/realip v0.0.0-20180522021738-f0c99a92ddce
|
github.com/tomasen/realip v0.0.0-20180522021738-f0c99a92ddce
|
||||||
github.com/urfave/cli v1.22.3
|
github.com/urfave/cli v1.22.3
|
||||||
|
github.com/zeebo/errs v1.2.2
|
||||||
golang.org/x/crypto v0.0.0-20200311171314-f7b00557c8c4
|
golang.org/x/crypto v0.0.0-20200311171314-f7b00557c8c4
|
||||||
golang.org/x/net v0.0.0-20200301022130-244492dfa37a
|
golang.org/x/net v0.0.0-20200301022130-244492dfa37a
|
||||||
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d
|
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d
|
||||||
|
|
|
@ -16,6 +16,7 @@ import (
|
||||||
"github.com/aws/aws-sdk-go/aws/session"
|
"github.com/aws/aws-sdk-go/aws/session"
|
||||||
"github.com/aws/aws-sdk-go/service/s3"
|
"github.com/aws/aws-sdk-go/service/s3"
|
||||||
"github.com/aws/aws-sdk-go/service/s3/s3manager"
|
"github.com/aws/aws-sdk-go/service/s3/s3manager"
|
||||||
|
"github.com/zeebo/errs"
|
||||||
"golang.org/x/net/context"
|
"golang.org/x/net/context"
|
||||||
"golang.org/x/oauth2"
|
"golang.org/x/oauth2"
|
||||||
"golang.org/x/oauth2/google"
|
"golang.org/x/oauth2/google"
|
||||||
|
@ -663,5 +664,5 @@ func (s *StorjStorage) Put(token string, filename string, reader io.Reader, cont
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *StorjStorage) IsNotExist(err error) bool {
|
func (s *StorjStorage) IsNotExist(err error) bool {
|
||||||
return err == uplink.ErrObjectNotFound
|
return errs.Is(err, uplink.ErrObjectNotFound)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue