Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'internal/structerr/error.go')
-rw-r--r--internal/structerr/error.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/internal/structerr/error.go b/internal/structerr/error.go
index e0c5dd0c7..70cc9a58e 100644
--- a/internal/structerr/error.go
+++ b/internal/structerr/error.go
@@ -262,7 +262,8 @@ func (e Error) GRPCStatus() *status.Status {
func (e Error) errorChain() []Error {
var result []Error
for err := error(e); err != nil; err = errors.Unwrap(err) {
- if structErr, ok := err.(Error); ok {
+ var structErr Error
+ if errors.As(err, &structErr) {
result = append(result, structErr)
}
}