include the error code

This commit is contained in:
Alfred Kamanda 2025-10-22 11:46:13 +03:00
parent 6f7802b58c
commit 532547899f
Signed by: Alfred-mk
GPG Key ID: E60B2165A97F4D41

View File

@ -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
}