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:
committed by
Wolfgang Walther
parent
e4984dc751
commit
491c7a0891
Vendored
+1
-1
@@ -3714,7 +3714,7 @@ begin
|
||||
perform set_config('response.headers', json_build_array(json_build_object('Content-Type', 'app/groucho'))::text, true);
|
||||
resp := 'groucho';
|
||||
else
|
||||
raise sqlstate 'PT415' using message = 'Unsupported Media Type';
|
||||
raise sqlstate 'PT406' using message = 'Not Acceptable';
|
||||
end case;
|
||||
return resp;
|
||||
end; $$ language plpgsql;
|
||||
|
||||
Reference in New Issue
Block a user