include the error code
This commit is contained in:
parent
6f7802b58c
commit
532547899f
@ -33,6 +33,9 @@ type APIError struct {
|
||||
}
|
||||
|
||||
func (e *APIError) Error() string {
|
||||
if e.Code != "" {
|
||||
return fmt.Sprintf("[%s] %s", e.Code, e.Description)
|
||||
}
|
||||
return e.Description
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user