api-builder-0.17.0.0: Library for easily building REST API wrappers in Haskell

Safe HaskellNone
LanguageHaskell2010

Network.API.Builder.Error

Synopsis

Documentation

data APIError a Source #

Error type for the API, where a is the type that should be returned when something goes wrong on the other end - i.e. any error that isn't directly related to this library.

Constructors

APIError a

A type that represents any error that happens on the API end. Define your own custom type with a FromJSON instance if you want to handle them, or you can use () if you just want to ignore them all.

HTTPError HttpException

Something went wrong when we tried to do a HTTP operation.

InvalidURLError

You're trying to create an invalid URL somewhere - check your Builder's base URL and your Routes.

ParseError String

Failed when parsing the response, and it wasn't an error on their end.

EmptyError

Empty error to serve as a zero element for Monoid.

Instances
Eq a => Eq (APIError a) Source # 
Instance details

Defined in Network.API.Builder.Error

Methods

(==) :: APIError a -> APIError a -> Bool #

(/=) :: APIError a -> APIError a -> Bool #

Show a => Show (APIError a) Source # 
Instance details

Defined in Network.API.Builder.Error

Methods

showsPrec :: Int -> APIError a -> ShowS #

show :: APIError a -> String #

showList :: [APIError a] -> ShowS #

Semigroup (APIError a) Source # 
Instance details

Defined in Network.API.Builder.Error

Methods

(<>) :: APIError a -> APIError a -> APIError a #

sconcat :: NonEmpty (APIError a) -> APIError a #

stimes :: Integral b => b -> APIError a -> APIError a #

Monoid (APIError a) Source # 
Instance details

Defined in Network.API.Builder.Error

Methods

mempty :: APIError a #

mappend :: APIError a -> APIError a -> APIError a #

mconcat :: [APIError a] -> APIError a #