From 70f6c4952473b54b841bcd39185e62b82ec5eb22 Mon Sep 17 00:00:00 2001 From: Maxim Koltsov Date: Sun, 31 Oct 2021 12:36:57 +0100 Subject: [PATCH] Get rid of Unicode in err404 example (#1478) ServerError field errBody uses ByteString, whose IsString instance kills Unicode, thus turning example into garbage. Changed it to simple ASCII string, since Unicode art did not exactly correspond to 404 error anyway. Fixes #1371 --- servant-server/src/Servant/Server/Internal/ServerError.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/servant-server/src/Servant/Server/Internal/ServerError.hs b/servant-server/src/Servant/Server/Internal/ServerError.hs index a22e953b..5b5d56e2 100644 --- a/servant-server/src/Servant/Server/Internal/ServerError.hs +++ b/servant-server/src/Servant/Server/Internal/ServerError.hs @@ -187,7 +187,7 @@ err403 = ServerError { errHTTPCode = 403 -- Example: -- -- > failingHandler :: Handler () --- > failingHandler = throwError $ err404 { errBody = "(╯°□°)╯︵ ┻━┻)." } +-- > failingHandler = throwError $ err404 { errBody = "Are you lost?" } -- err404 :: ServerError err404 = ServerError { errHTTPCode = 404