Skip to content

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:

2020-01-16_10.33.57

After:

2020-01-16_10.34.58

Does this MR meet the acceptance criteria?

Conformity

Closes #196874 (closed)

Edited by Sean Arnold

Merge request reports

Loading