handle-error-codes #18
@ -33,6 +33,9 @@ type APIError struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (e *APIError) Error() string {
|
func (e *APIError) Error() string {
|
||||||
|
if e.Code != "" {
|
||||||
|
return fmt.Sprintf("[%s] %s", e.Code, e.Description)
|
||||||
|
}
|
||||||
return e.Description
|
return e.Description
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user