Safe Haskell | None |
---|---|
Language | Haskell2010 |
BDCS.API.Error
Description
Error functions for use with BDCS.API
- createAPIError :: ServantErr -> Bool -> [String] -> ServantErr
- tryIO :: IO a -> ExceptT String IO a
- data APIResponse = APIResponse {}
Documentation
createAPIError :: ServantErr -> Bool -> [String] -> ServantErr Source #
Create a ServantErr
with an error id and a message
base
- The default
ServantErr
response status
- The response status
messages
- A list of human readable messages to include with the error
data APIResponse Source #
API Status response with possible error messages used to report errors with API requests
This is converted to a JSON error response that is used in the API responses
{ "status": false, "errors": ["compose: Unsupported output type"] } }
Constructors
APIResponse | |
Instances