include the error code

This commit is contained in:
2025-10-22 11:46:13 +03:00
parent 6f7802b58c
commit 532547899f

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
}