Better debug diagnostics when server-side err is nil
@@ -18,7 +18,11 @@ func (e Error) Error() string {
}
func (e *Error) ProvideDiagnostic() {
+ if e.e != nil {
e.Diagnostic = fmt.Sprintf("server-side error: %s", e.e)
+ } else {
+ e.Diagnostic = "no further diagnostic information available"
+ }
}
func Bad(e error, msg string, args ...interface{}) Error {
