aboutsummaryrefslogtreecommitdiff
path: root/api/api.go
diff options
context:
space:
mode:
Diffstat (limited to 'api/api.go')
-rw-r--r--api/api.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/api/api.go b/api/api.go
index ece2a26..79a13a5 100644
--- a/api/api.go
+++ b/api/api.go
@@ -58,6 +58,9 @@ func ErrorIs(err error, code ErrorCode) bool {
58} 58}
59 59
60func NewInternalError(err error) *Error { 60func NewInternalError(err error) *Error {
61 if apiError, ok := err.(*Error); ok {
62 return apiError
63 }
61 return &Error{InternalError, "internal error", err} 64 return &Error{InternalError, "internal error", err}
62} 65}
63 66