Merge pull request #646 from genya0407/422-unprocessable-entity-error
add HTTP status code 422
This commit is contained in:
commit
37ec081c20
1 changed files with 14 additions and 0 deletions
|
@ -376,6 +376,20 @@ err418 = ServantErr { errHTTPCode = 418
|
|||
, errHeaders = []
|
||||
}
|
||||
|
||||
-- | 'err422' Unprocessable Entity
|
||||
--
|
||||
-- Example:
|
||||
--
|
||||
-- > failingHandler :: Handler ()
|
||||
-- > failingHandler = throwError $ err422 { errBody = "I understood your request, but can't process it." }
|
||||
--
|
||||
err422 :: ServantErr
|
||||
err422 = ServantErr { errHTTPCode = 422
|
||||
, errReasonPhrase = "Unprocessable Entity"
|
||||
, errBody = ""
|
||||
, errHeaders = []
|
||||
}
|
||||
|
||||
-- | 'err500' Internal Server Error
|
||||
--
|
||||
-- Example:
|
||||
|
|
Loading…
Reference in a new issue