create a custom error struct that carries both fields from the API

This commit is contained in:
Alfred Kamanda 2025-10-21 15:02:36 +03:00
parent 8d4fbb9c2e
commit 73e6220a8c
Signed by: Alfred-mk
GPG Key ID: E60B2165A97F4D41

View File

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