mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-04 18:31:13 -05:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user