gargantext-0.0.7.1.5.3: Search, map, share
Safe HaskellSafe-Inferred
LanguageHaskell2010

Gargantext.API.Errors

Synopsis

Documentation

Types

data GargErrorScheme #

Constructors

GES_old

The old error scheme.

GES_new

The new error scheme, that returns a FrontendError.

Instances

Instances details
Show GargErrorScheme #

Error scheme for GraphQL, has to be slightly different {errors: [{message, extensions: { ... }}]} https://spec.graphql.org/June2018/#sec-Errors

Instance details

Defined in Gargantext.API.Errors

Eq GargErrorScheme # 
Instance details

Defined in Gargantext.API.Errors

Conversion functions

backendErrorToFrontendError :: BackendInternalError -> FrontendError #

Transforms a backend internal error into something that the frontend can consume. This is the only representation we offer to the outside world, as we later encode this into a ServerError in the main server handler.

frontendErrorToServerError :: FrontendError -> ServerError #

Converts a FrontendError into a ServerError that the servant app can return to the frontend.

Temporary shims