amo/api/errors.go
2024-03-04 06:31:33 +05:00

24 lines
524 B
Go

package api
import (
"errors"
"fmt"
)
var (
NoContentErr = errors.New("no content")
NoAuthErr = errors.New("not authorized")
NoInternetErr = errors.New("no Internet provided")
InvalidUrlOptionsErr = errors.New("invalid URL options")
InvalidExchangeAuthOptionsErr = errors.New("invalid ExchangeAuth options")
UrlParsingErr = errors.New("URL parsing")
)
func NewApiError(err error) error {
return fmt.Errorf("NewApi: %w", err)
}
func RequestError(err error) error {
return fmt.Errorf("RequestError: %w", err)
}