Skip to content

Commit

Permalink
add debug info for RPCErrorStringTOErrno()
Browse files Browse the repository at this point in the history
  • Loading branch information
dguerri committed Jul 31, 2024
1 parent 13463a7 commit 55e4ad2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/rpccommon/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"log"
"os"
"reflect"
"runtime/debug"
"strings"
"syscall"
)
Expand Down Expand Up @@ -525,7 +526,7 @@ func RPCErrorStringTOErrno(err error) (syserr syscall.Errno) {
if strings.HasPrefix(err.Error(), "errno: ") {
return SymToErrno(strings.SplitN(err.Error(), " ", 2)[1])
}
log.Printf("malformed error from server: %s", err.Error())
log.Printf("malformed error from server: %s\n%s", err.Error(), debug.Stack())
syserr = syscall.EIO
return
}

0 comments on commit 55e4ad2

Please sign in to comment.