Send response data as a formatted string to Sentry
For JSON errors, some rather unhelpful data is displayed in Sentry and the UI provides no way of browsing the nested data:
However, for HTML or text errors, error.response.data
from Axios is a string, and it is displayed properly:
This MR sacrifices syntax highlighting so we can have some JSON as a multi-line string. The null, 2
arguments are the equivalent of indent=2
in Python.