mirror of
https://github.com/kemko/nomad.git
synced 2026-01-07 19:05:42 +03:00
Code review comment
This commit is contained in:
@@ -1143,10 +1143,10 @@ func (n *Node) DeriveVaultToken(args *structs.DeriveVaultTokenRequest,
|
||||
if e == nil {
|
||||
return
|
||||
}
|
||||
re, ok := e.(structs.Recoverable)
|
||||
re, ok := e.(*structs.RecoverableError)
|
||||
if ok {
|
||||
// No need to wrap if error already implements Recoverable
|
||||
reply.Error = re.(*structs.RecoverableError)
|
||||
// No need to wrap if error is already a RecoverableError
|
||||
reply.Error = re
|
||||
} else {
|
||||
reply.Error = structs.NewRecoverableError(e, recoverable).(*structs.RecoverableError)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user