Merge pull request #646 from genya0407/422-unprocessable-entity-error

add HTTP status code 422
This commit is contained in:
Julian Arni 2016-12-04 21:56:59 +00:00 committed by GitHub
commit 37ec081c20

View file

@ -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: