orville-postgresql-1.0.0.0: A Haskell library for PostgreSQL
CopyrightFlipstone Technology Partners 2023
LicenseMIT
StabilityStable
Safe HaskellSafe-Inferred
LanguageHaskell2010

Orville.PostgreSQL.Marshall.MarshallError

Description

Since: 1.0.0.0

Synopsis

Documentation

data MarshallError Source #

A MarshallError may be returned from marshallResultFromSql when a row being decoded from the database doesn't meet the expectations of the SqlMarshaller that is decoding it.

Since: 1.0.0.0

Constructors

MarshallError 

Fields

renderMarshallError :: ErrorDetailLevel -> MarshallError -> String Source #

Renders a MarshallError to a string using the specified ErrorDetailLevel.

This ignores any ErrorDetailLevel that was captured by default from the Orville context and uses the specified level of detail instead.

You may want to use this function to render certain errors with a higher level of detail than you consider safe for (for example) your application logs while using a lower default error detail level with the Show instance of MarshallError in case an exception is handled in a more visible section of code that returns information more publicly (e.g. a request handler for a public endpoint).

Since: 1.0.0.0

data MarshallErrorDetails Source #

A MarshallErrorDetails may be returned from marshallResultFromSql if the result set being decoded from the database doesn't meet the expectations of the SqlMarshaller that is decoding it.

Since: 1.0.0.0

Constructors

DecodingError DecodingErrorDetails

Indicates that one or more values in a column could not be decoded, either individually or as a group.

MissingColumnError MissingColumnErrorDetails

Indicates that an expected column was not found in the result set.

data DecodingErrorDetails Source #

Details about an error that occurred while decoding values found in a SQL result set.

Since: 1.0.0.0

data MissingColumnErrorDetails Source #

Details about a column that was found to be missing in a SQL result set during decoding.

Since: 1.0.0.0