Explicit responses should bypass error pages
Currently if text/html is accepted, Up will serve the error page. It seems common for people to fetch() or curl without explicitly setting Accept: application/json or similar, resulting in the HTML which can be confusing.
We could disable error pages by default, or maybe drop content negotiation and assume non-text/plain responses are intentional, something like that.
Note to self: at least document Accept usage
I would definitely prefer the above mentioned
I think this is a good idea - I got caught out by this and it took a good while to realize what was going on due to obscure messages Apollo Client was spitting out. Id recommend error pages to be Opt-in. If not - a big warning on the docs that an "unexpected token" error is likely due to this.
@glenarama interesting that Apollo doesn't set Accept, but yea I'm definitely starting to think assuming people utilize the header is a bad idea haha, easier to make it opt-in