typo in timeout tests + adding tests for standarderror

This commit is contained in:
Julien Neuhart
2019-07-08 17:50:31 +02:00
parent 9af00d6d58
commit 9c6f23d7cc
5 changed files with 77 additions and 4 deletions

View File

@@ -64,6 +64,8 @@ func Code(err error) string {
return Internal
}
const defaultMessage = "an internal error has occurred: please contact technical support"
// Message returns the human-readable message of the error, if available.
// Otherwise returns a generic error message.
func Message(err error) string {
@@ -77,7 +79,7 @@ func Message(err error) string {
if ok && e.Err != nil {
return Message(e.Err)
}
return "An internal error has occurred. Please contact technical support."
return defaultMessage
}
// Op returns the logical operation of the error, if available.