fix: Return 406 instead of 415 for non-acceptable media type
415 is for Content-Type and 406 for Accept headers.
This commit is contained in:
@@ -939,12 +939,12 @@ spec actualPgVersion = do
|
||||
}
|
||||
|
||||
describe "Accept headers" $ do
|
||||
it "should respond an unknown accept type with 415" $
|
||||
it "should respond an unknown accept type with 406" $
|
||||
request methodGet "/simple_pk"
|
||||
(acceptHdrs "text/unknowntype") ""
|
||||
`shouldRespondWith`
|
||||
[json|{"message":"None of these media types are available: text/unknowntype","code":"PGRST107","details":null,"hint":null}|]
|
||||
{ matchStatus = 415
|
||||
{ matchStatus = 406
|
||||
, matchHeaders = [matchContentTypeJson]
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user