Skip to content

Commit

Permalink
Merge pull request #110 from brandonbloom/wrapped-err-message
Browse files Browse the repository at this point in the history
Include wrapped error message in NFSStatusError.Error().
  • Loading branch information
willscott authored Dec 24, 2023
2 parents c4b888e + fec9a8b commit 4e20ea0
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 4e20ea0

Please sign in to comment.