26 lines
523 B
Go
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)
|
|
}
|
|
|