mirror of
https://github.com/restic/restic.git
synced 2026-10-18 07:28:12 +00:00
Update dependencies
Among others, this updates minio-go, so that the new "eu-west-3" zone for AWS is supported.
This commit is contained in:
1 parent
b63de7c798
commit
2b39f9f4b2
3435 files changed
+1317989
-315639
No files matched your search
+9
-2
@@ -19,6 +19,7 @@ package spanner
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"golang.org/x/net/context"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/metadata"
|
||||
@@ -74,10 +75,16 @@ func toSpannerErrorWithMetadata(err error, trailers metadata.MD) error {
|
||||
}
|
||||
return se
|
||||
}
|
||||
if grpc.Code(err) == codes.Unknown {
|
||||
switch {
|
||||
case err == context.DeadlineExceeded:
|
||||
return &Error{codes.DeadlineExceeded, err.Error(), trailers}
|
||||
case err == context.Canceled:
|
||||
return &Error{codes.Canceled, err.Error(), trailers}
|
||||
case grpc.Code(err) == codes.Unknown:
|
||||
return &Error{codes.Unknown, err.Error(), trailers}
|
||||
default:
|
||||
return &Error{grpc.Code(err), grpc.ErrorDesc(err), trailers}
|
||||
}
|
||||
return &Error{grpc.Code(err), grpc.ErrorDesc(err), trailers}
|
||||
}
|
||||
|
||||
// ErrCode extracts the canonical error code from a Go error.
|
||||
|
||||
Reference in new issue
Block a user