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

Orville.PostgreSQL.ErrorDetailLevel

Description

Since: 1.0.0.0

Synopsis

Documentation

data ErrorDetailLevel Source #

ErrorDetailLevel provides a means to configure what elements of information are included in error messages that originate from decoding rows queried from the database. This can be specified either by manually rendering the error message and providing the desired configuration, or by setting the desired detail level in the OrvilleState as a default.

Information will be redacted from error messages for any of the fields that are set to False.

Since: 1.0.0.0

Instances

Instances details
Show ErrorDetailLevel Source #

Since: 1.0.0.0

Instance details

Defined in Orville.PostgreSQL.ErrorDetailLevel

defaultErrorDetailLevel :: ErrorDetailLevel Source #

A default ErrorDetailLevel that strikes a balance of including all Generic information such as the error message, schema names and row identifiers, but avoids unintentionally leaking non-identifier values from the database by redacting them.

Since: 1.0.0.0

minimalErrorDetailLevel :: ErrorDetailLevel Source #

A minimal ErrorDetailLevel where all information (including any situationally-specific error messages!) is redacted from error messages.

Since: 1.0.0.0

maximalErrorDetailLevel :: ErrorDetailLevel Source #

A maximal ErrorDetailLevel that redacts no information from the error messages. Error messages will include values from the database for any columns that are involved in a decoding failure, including some which you may not have intended to expose through error messages. Use with caution.

Since: 1.0.0.0

redactErrorMessage :: ErrorDetailLevel -> String -> String Source #

Redacts given the error message string if the ErrorDetailLevel indicates that error messages should be redacted.

Since: 1.0.0.0

redactSchemaName :: ErrorDetailLevel -> String -> String Source #

Redacts given the schema name string if the ErrorDetailLevel indicates that schema names should be redacted.

Since: 1.0.0.0

redactIdentifierValue :: ErrorDetailLevel -> String -> String Source #

Redacts given the identifier value string if the ErrorDetailLevel indicates that identifier values should be redacted.

Since: 1.0.0.0

redactNonIdentifierValue :: ErrorDetailLevel -> String -> String Source #

Redacts given the non-identifier value string if the ErrorDetailLevel indicates that non-identifier values should be redacted.

Since: 1.0.0.0