Skip to content

Commit

Permalink
Include wrapped error message in NFSStatusError.Error().
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonbloom committed Dec 23, 2023
1 parent c4b888e commit fec9a8b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,11 @@ type NFSStatusError struct {

// Error is The wrapped error
func (s *NFSStatusError) Error() string {
return s.NFSStatus.String()
message := s.NFSStatus.String()
if s.WrappedErr != nil {
message = fmt.Sprintf("%s: %v", message, s.WrappedErr)
}
return message
}

// Code for NFS issues are successful RPC responses
Expand Down

0 comments on commit fec9a8b

Please sign in to comment.