From e88a0577e5297d049d76ea841a36c8a732e0b7bb Mon Sep 17 00:00:00 2001 From: Jacky Hu Date: Thu, 16 Jun 2016 12:41:27 +0800 Subject: [PATCH] Avoid repeating mime types --- src/PostgREST/ApiRequest.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/PostgREST/ApiRequest.hs b/src/PostgREST/ApiRequest.hs index 9cf82097e..5002454fe 100644 --- a/src/PostgREST/ApiRequest.hs +++ b/src/PostgREST/ApiRequest.hs @@ -124,8 +124,8 @@ userApiRequest schema req reqBody = Nothing -> PayloadParseError "All lines must have same number of fields" Just json -> PayloadJSON json) (CSV.decodeByName reqBody) - Right OpenAPI -> - PayloadParseError "Content-type not acceptable: application/openapi+json; charset=utf-8" + Right oa@OpenAPI -> + PayloadParseError $ "Content-type not acceptable: " <> cs (show oa) -- This is a Left value because form-urlencoded is not a content -- type which we ever use for responses, only something we handle -- just this once for requests