Ensure JSON is used for Sentry requests
What does this MR do?
This fixes the client calls to Sentry to make sure it works for both Sentry.com and self-hosted Sentry instances.
Before this fix the Sentry update would work on Sentry.com, but did not seem to work for self-hosted instances such as sentry.gitlab.net
.
Upon further investigation we were receiving 415 Unsupported Media Type
responses.
Changing the request to send Content-Type: application/json
, and for PUT (and POST in the future) ensuring that the body is a JSON hash seems to fix the issue.
Screenshots
Before:
After:
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Closes #196874 (closed)
Edited by Sean Arnold