Change JSON-specific error message to a more general one
This commit is contained in:
parent
b24822a448
commit
0be89b4f3d
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