The front-end JavaScript is assuming responses will come through as plain text, so rather than change that, and the other places that already work like that, it's easier to make these new errors conform to what's already there.