Use correct HTTP status code for bad content type

415 is the status code for ‘Unsupported media type’

https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/415
This commit is contained in:
Chris Hill-Scott
2021-01-26 12:01:10 +00:00
parent b85fcafd46
commit 0398ac57f1
2 changed files with 3 additions and 3 deletions

View File

@@ -24,7 +24,7 @@ def create_broadcast():
if request.content_type != 'application/cap+xml':
raise BadRequestError(
message=f'Content type {request.content_type} not supported',
status_code=400,
status_code=415,
)
cap_xml = request.get_data(as_text=True)