Refactor response from failed schema check to set status code and detailed error message.