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:
Wolfgang Walther
2024-05-09 18:56:47 +02:00
committed by Wolfgang Walther
parent e4984dc751
commit 491c7a0891
8 changed files with 19 additions and 18 deletions
+1 -1
View File
@@ -65,7 +65,7 @@ instance PgrstError ApiRequestError where
status AggregatesNotAllowed{} = HTTP.status400
status AmbiguousRelBetween{} = HTTP.status300
status AmbiguousRpc{} = HTTP.status300
status MediaTypeError{} = HTTP.status415
status MediaTypeError{} = HTTP.status406
status InvalidBody{} = HTTP.status400
status InvalidFilters = HTTP.status405
status InvalidPreferences{} = HTTP.status400