|
@@ -337,7 +337,10 @@ func (e *Error) StatusCode() int {
|
|
|
|
|
|
|
|
// Error allows AError to implement the error interface.
|
|
// Error allows AError to implement the error interface.
|
|
|
func (e *Error) Error() string {
|
|
func (e *Error) Error() string {
|
|
|
- return e.Detail
|
|
|
|
|
|
|
+ if e.Err == nil {
|
|
|
|
|
+ return e.Detail
|
|
|
|
|
+ }
|
|
|
|
|
+ return e.Err.Error()
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// Cause returns the internal error and implements the Causer interface.
|
|
// Cause returns the internal error and implements the Causer interface.
|