Avoid repeating mime types

This commit is contained in:
Jacky Hu
2016-06-18 10:18:43 +08:00
parent c10bde8d65
commit e88a0577e5
+2 -2
View File
@@ -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