Response is mixed json and html

Hi there, I’m a bit confused about this response I get from the api, when a required-field is missing in the request to create a new entry. I’m not able to catch this error because it is html with some json portion “appended” Im pretty sure I am making mistake here but I can not really find it. can somebody help me?

In this screenshot you see the mixed response I get and I need the json-only.

Thx in advance. Philipp