hscim-0.3.6: hscim json schema and server implementation
Safe HaskellNone
LanguageHaskell2010

Web.Scim.Schema.Error

Description

SCIM errors

Synopsis

Types

data ScimErrorType Source #

An ADT for error types in the SCIM specification. Not all possible SCIM errors have a corresponding ScimErrorType (for instance, authorization is not covered by this type).

See https://tools.ietf.org/html/rfc7644#page-69

Instances

Instances details
Eq ScimErrorType Source # 
Instance details

Defined in Web.Scim.Schema.Error

Show ScimErrorType Source # 
Instance details

Defined in Web.Scim.Schema.Error

Generic ScimErrorType Source # 
Instance details

Defined in Web.Scim.Schema.Error

Associated Types

type Rep ScimErrorType :: Type -> Type #

ToJSON ScimErrorType Source # 
Instance details

Defined in Web.Scim.Schema.Error

type Rep ScimErrorType Source # 
Instance details

Defined in Web.Scim.Schema.Error

type Rep ScimErrorType = D1 ('MetaData "ScimErrorType" "Web.Scim.Schema.Error" "hscim-0.3.6-JBBH5QJtoVCBhDdsGW2kZ7" 'False) (((C1 ('MetaCons "InvalidFilter" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TooMany" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Uniqueness" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Mutability" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "InvalidSyntax" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "InvalidPath" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "NoTarget" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "InvalidValue" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "InvalidVers" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Sensitive" 'PrefixI 'False) (U1 :: Type -> Type)))))

data ScimError Source #

Instances

Instances details
Eq ScimError Source # 
Instance details

Defined in Web.Scim.Schema.Error

Show ScimError Source # 
Instance details

Defined in Web.Scim.Schema.Error

Generic ScimError Source # 
Instance details

Defined in Web.Scim.Schema.Error

Associated Types

type Rep ScimError :: Type -> Type #

ToJSON ScimError Source # 
Instance details

Defined in Web.Scim.Schema.Error

Exception ScimError Source # 
Instance details

Defined in Web.Scim.Schema.Error

type Rep ScimError Source # 
Instance details

Defined in Web.Scim.Schema.Error

type Rep ScimError = D1 ('MetaData "ScimError" "Web.Scim.Schema.Error" "hscim-0.3.6-JBBH5QJtoVCBhDdsGW2kZ7" 'False) (C1 ('MetaCons "ScimError" 'PrefixI 'True) ((S1 ('MetaSel ('Just "schemas") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Schema]) :*: S1 ('MetaSel ('Just "status") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Status)) :*: (S1 ('MetaSel ('Just "scimType") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe ScimErrorType)) :*: S1 ('MetaSel ('Just "detail") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)))))

newtype Status Source #

Constructors

Status 

Fields

Instances

Instances details
Eq Status Source # 
Instance details

Defined in Web.Scim.Schema.Error

Methods

(==) :: Status -> Status -> Bool #

(/=) :: Status -> Status -> Bool #

Show Status Source # 
Instance details

Defined in Web.Scim.Schema.Error

Generic Status Source # 
Instance details

Defined in Web.Scim.Schema.Error

Associated Types

type Rep Status :: Type -> Type #

Methods

from :: Status -> Rep Status x #

to :: Rep Status x -> Status #

ToJSON Status Source # 
Instance details

Defined in Web.Scim.Schema.Error

type Rep Status Source # 
Instance details

Defined in Web.Scim.Schema.Error

type Rep Status = D1 ('MetaData "Status" "Web.Scim.Schema.Error" "hscim-0.3.6-JBBH5QJtoVCBhDdsGW2kZ7" 'True) (C1 ('MetaCons "Status" 'PrefixI 'True) (S1 ('MetaSel ('Just "unStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)))

Constructors

notFound Source #

Arguments

:: Text

Resource type

-> Text

Resource ID

-> ScimError 

badRequest Source #

Arguments

:: ScimErrorType

Error type

-> Maybe Text

Error details

-> ScimError 

unauthorized Source #

Arguments

:: Text

Error details

-> ScimError 

forbidden Source #

Arguments

:: Text

Error details

-> ScimError 

serverError Source #

Arguments

:: Text

Error details

-> ScimError 

Servant interoperability

scimToServerError :: ScimError -> ServerError Source #

Convert a SCIM Error to a Servant one by encoding it with the appropriate headers.