Copyright | Flipstone Technology Partners 2023 |
---|---|
License | MIT |
Stability | Stable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Since: 1.0.0.0
Synopsis
- data ErrorDetailLevel = ErrorDetailLevel {}
- defaultErrorDetailLevel :: ErrorDetailLevel
- minimalErrorDetailLevel :: ErrorDetailLevel
- maximalErrorDetailLevel :: ErrorDetailLevel
- redactErrorMessage :: ErrorDetailLevel -> String -> String
- redactSchemaName :: ErrorDetailLevel -> String -> String
- redactIdentifierValue :: ErrorDetailLevel -> String -> String
- redactNonIdentifierValue :: ErrorDetailLevel -> String -> String
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
Show ErrorDetailLevel Source # | Since: 1.0.0.0 |
Defined in Orville.PostgreSQL.ErrorDetailLevel showsPrec :: Int -> ErrorDetailLevel -> ShowS # show :: ErrorDetailLevel -> String # showList :: [ErrorDetailLevel] -> ShowS # |
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