bdcs-api-0.1.3: BDCS API Server

Safe HaskellNone
LanguageHaskell2010

BDCS.API.Error

Description

Error functions for use with BDCS.API

Synopsis

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

tryIO :: IO a -> ExceptT String IO a Source #

Convert IO Exceptions into an ExceptT.

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 

Fields