Skip to content

Commit

Permalink
Get rid of Unicode in err404 example (#1478)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
maksbotan committed Oct 31, 2021
1 parent 70b3721 commit 70f6c49
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion servant-server/src/Servant/Server/Internal/ServerError.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 70f6c49

Please sign in to comment.