Skip to content
This repository was archived by the owner on Oct 23, 2023. It is now read-only.

Commit 6cb3c79

Browse files
author
Iva Kaneva
committed
Recognize Content Type application/vnd.api+json as JSON type
Sentry should recognize API JSON requests as JSON type not as Form. If they are recognized as Form the body payload appears empty in Sentry UI.
1 parent ce252ca commit 6cb3c79

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

raven/contrib/flask.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ def get_http_info(self, request):
193193
return self.get_http_info_with_retriever(request, retriever)
194194

195195
def is_json_type(self, content_type):
196-
return content_type == 'application/json'
196+
return content_type == 'application/json' or content_type.endswith('+json')
197197

198198
def get_form_data(self, request):
199199
return request.form

0 commit comments

Comments
 (0)