Exclude json content type from workhorse interception
What does this MR do?
This MR excludes application/json
content type from workhorse interception when there is an error response.
This is currently happening for https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/31669 - whenever user tries to update their username when username has been already taken, error response is in text/plain
instead (generic 422 error page) of expected application/json
For json
requests we would expect json
response, without workhorse interception. There is no need in generic error pages in this case.
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry for user-facing changes, or community contribution. Check the link for other scenarios. - [-] Documentation created/updated or follow-up review issue created
-
Code review guidelines - [-] Merge request performance guidelines
-
Style guides - [-] Database guides
- [-] Separation of EE specific content
Performance and Testing
N/A
Security
N/A
Edited by 🤖 GitLab Bot 🤖