graphql-engine-1.0.0: GraphQL API over Postgres
Safe HaskellNone
LanguageHaskell2010

Hasura.Backends.Postgres.SQL.Error

Description

Postgres SQL Error

Functions and datatypes for interpreting Postgres errors.

Synopsis

Documentation

data PGErrorType Source #

The top-level error code type. Errors in Postgres are divided into different classes, which are further subdivided into individual error codes. Even if a particular status code is not known to the application, it’s possible to determine its class and handle it appropriately.

Instances

Instances details
Eq PGErrorType Source # 
Instance details

Defined in Hasura.Backends.Postgres.SQL.Error

Show PGErrorType Source # 
Instance details

Defined in Hasura.Backends.Postgres.SQL.Error

data PGErrorCode a Source #

Constructors

PGErrorGeneric

represents errors that have the non-specific 000 status code

PGErrorSpecific a

represents errors with a known, more specific status code

Instances

Instances details
Functor PGErrorCode Source # 
Instance details

Defined in Hasura.Backends.Postgres.SQL.Error

Methods

fmap :: (a -> b) -> PGErrorCode a -> PGErrorCode b #

(<$) :: a -> PGErrorCode b -> PGErrorCode a #

Eq a => Eq (PGErrorCode a) Source # 
Instance details

Defined in Hasura.Backends.Postgres.SQL.Error

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

Defined in Hasura.Backends.Postgres.SQL.Error

_PGErrorSpecific :: forall a a. Prism (PGErrorCode a) (PGErrorCode a) a a Source #

_PGErrorGeneric :: forall a. Prism' (PGErrorCode a) () Source #

pgErrorType :: PGStmtErrDetail -> Maybe PGErrorType Source #