Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
SCIM errors
Synopsis
- data ScimErrorType
- data ScimError = ScimError {}
- newtype Status = Status {}
- notFound :: Text -> Text -> ScimError
- badRequest :: ScimErrorType -> Maybe Text -> ScimError
- conflict :: ScimError
- unauthorized :: Text -> ScimError
- forbidden :: Text -> ScimError
- serverError :: Text -> ScimError
- scimToServerError :: ScimError -> ServerError
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).
InvalidFilter | |
TooMany | |
Uniqueness | |
Mutability | |
InvalidSyntax | |
InvalidPath | |
NoTarget | |
InvalidValue | |
InvalidVers | |
Sensitive |
Instances
Instances
ToJSON ScimError Source # | |
Defined in Web.Scim.Schema.Error | |
Exception ScimError Source # | |
Defined in Web.Scim.Schema.Error toException :: ScimError -> SomeException # fromException :: SomeException -> Maybe ScimError # displayException :: ScimError -> String # | |
Generic ScimError Source # | |
Show ScimError Source # | |
Eq ScimError Source # | |
type Rep ScimError Source # | |
Defined in Web.Scim.Schema.Error type Rep ScimError = D1 ('MetaData "ScimError" "Web.Scim.Schema.Error" "hscim-0.4.0.4-2j6MXcQGp1TDKeruswPvhg" '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))))) |
Constructors
:: ScimErrorType | Error type |
-> Maybe 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.