From 3f6ecbb77bc4a11b4a582fd909de8c8334787a0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6nke=20Hahn?= Date: Sun, 23 Oct 2016 14:37:05 -0400 Subject: [PATCH] add err418 --- .../src/Servant/Server/Internal/ServantErr.hs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/servant-server/src/Servant/Server/Internal/ServantErr.hs b/servant-server/src/Servant/Server/Internal/ServantErr.hs index e1267ce6..0d77fd1f 100644 --- a/servant-server/src/Servant/Server/Internal/ServantErr.hs +++ b/servant-server/src/Servant/Server/Internal/ServantErr.hs @@ -362,6 +362,20 @@ err417 = ServantErr { errHTTPCode = 417 , errHeaders = [] } +-- | 'err418' Expectation Failed +-- +-- Example: +-- +-- > failingHandler :: Handler () +-- > failingHandler = throwError $ err418 { errBody = "Apologies, this is not a webserver but a teapot." } +-- +err418 :: ServantErr +err418 = ServantErr { errHTTPCode = 418 + , errReasonPhrase = "I'm a teapot" + , errBody = "" + , errHeaders = [] + } + -- | 'err500' Internal Server Error -- -- Example: