mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-03 03:58:01 +00:00
The big one (#5346)
This commit is contained in:
@@ -70,11 +70,13 @@ func RespondErrorCommon(req *Request, resp *Response, err error) (int, error) {
|
||||
|
||||
if errwrap.ContainsType(err, new(ReplicationCodedError)) {
|
||||
var allErrors error
|
||||
codedErr := errwrap.GetType(err, new(ReplicationCodedError)).(*ReplicationCodedError)
|
||||
var codedErr *ReplicationCodedError
|
||||
errwrap.Walk(err, func(inErr error) {
|
||||
newErr, ok := inErr.(*ReplicationCodedError)
|
||||
if !ok {
|
||||
allErrors = multierror.Append(allErrors, newErr)
|
||||
if ok {
|
||||
codedErr = newErr
|
||||
} else {
|
||||
allErrors = multierror.Append(allErrors, inErr)
|
||||
}
|
||||
})
|
||||
if allErrors != nil {
|
||||
|
||||
Reference in New Issue
Block a user