Skip to content

Commit fec9a8b

Browse files
committed
Include wrapped error message in NFSStatusError.Error().
1 parent c4b888e commit fec9a8b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

errors.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,11 @@ type NFSStatusError struct {
172172

173173
// Error is The wrapped error
174174
func (s *NFSStatusError) Error() string {
175-
return s.NFSStatus.String()
175+
message := s.NFSStatus.String()
176+
if s.WrappedErr != nil {
177+
message = fmt.Sprintf("%s: %v", message, s.WrappedErr)
178+
}
179+
return message
176180
}
177181

178182
// Code for NFS issues are successful RPC responses

0 commit comments

Comments
 (0)