amo/api/errors.go
2024-05-30 13:43:10 +05:00

26 lines
523 B
Go

package api
import (
"errors"
"fmt"
)
var (
ErrNoContent = errors.New("no content")
ErrNoAuth = errors.New("not authorized")
ErrUnreachable = errors.New("unreachable")
ErrInvalidOptionsURL = errors.New("invalid URL options")
ErrInvalidExchangeAuthOptions= errors.New(
"invalid ExchangeAuth options",
)
ErrUrlParsing= errors.New("URL parsing")
)
func NewErrorAPI(err error) error {
return fmt.Errorf("NewAPI: %w", err)
}
func NewRequestError(err error) error {
return fmt.Errorf("RequestError: %w", err)
}