create a custom error struct that carries both fields from the API
This commit is contained in:
parent
8d4fbb9c2e
commit
73e6220a8c
@ -27,6 +27,15 @@ var (
|
||||
logg = logging.NewVanilla().WithDomain("sarafu-api.devapi")
|
||||
)
|
||||
|
||||
type APIError struct {
|
||||
Code string
|
||||
Description string
|
||||
}
|
||||
|
||||
func (e *APIError) Error() string {
|
||||
return e.Description
|
||||
}
|
||||
|
||||
type HTTPAccountService struct {
|
||||
SS storage.StorageService
|
||||
UseApi bool
|
||||
|
||||
Loading…
Reference in New Issue
Block a user