atlas-cardano
Copyright(c) 2023 GYELD GMBH
LicenseApache 2.0
Maintainer[email protected]
Stabilitydevelop
Safe HaskellNone
LanguageGHC2021

GeniusYield.HTTP.Errors

Description

 
Synopsis

Documentation

class IsGYApiError e where #

Class of types that can be converted into an HTTP API error.

Minimal complete definition

Nothing

Methods

toApiError :: e -> GYApiError #

default toApiError :: Exception e => e -> GYApiError #

Instances

Instances details
IsGYApiError GYApiError # 
Instance details

Defined in GeniusYield.HTTP.Errors

data GYApiError #

An example error code can be: INSUFFICIENT_BALANCE (i.e. it is not the HTTP status error message)

The message can be any textual representation of the error with more information.

The status code should be the HTTP status code.

Constructors

GYApiError 

someBackendError :: Text -> GYApiError #

Create a typical BACKEND_ERROR internal serval error with given message.