Merge pull request #31 from haskell-servant/wip-incorrect-error
Change JSON-specific error message to a more general one
This commit is contained in:
commit
947815e6d3
1 changed files with 1 additions and 1 deletions
|
@ -71,7 +71,7 @@ toApplication ra request respond = do
|
||||||
routingRespond (Left WrongMethod) =
|
routingRespond (Left WrongMethod) =
|
||||||
respond $ responseLBS methodNotAllowed405 [] "method not allowed"
|
respond $ responseLBS methodNotAllowed405 [] "method not allowed"
|
||||||
routingRespond (Left (InvalidBody err)) =
|
routingRespond (Left (InvalidBody err)) =
|
||||||
respond $ responseLBS badRequest400 [] $ fromString $ "Invalid JSON in request body: " ++ err
|
respond $ responseLBS badRequest400 [] $ fromString $ "invalid request body: " ++ err
|
||||||
routingRespond (Left UnsupportedMediaType) =
|
routingRespond (Left UnsupportedMediaType) =
|
||||||
respond $ responseLBS unsupportedMediaType415 [] "unsupported media type"
|
respond $ responseLBS unsupportedMediaType415 [] "unsupported media type"
|
||||||
routingRespond (Left (HttpError status body)) =
|
routingRespond (Left (HttpError status body)) =
|
||||||
|
|
Loading…
Reference in a new issue