1 or 3; maybe 4.
With several assumptions made, ultimately, they’re asking for json, and we should still return json, but what that looks like is up to you. It should be static enough that the person on the other end can write:
If json.grtnode(error) == "unauthorized access"
Do stuff
Ifnyour going to be changing the text with some regularity to contain relevant information for the error (eg, an item ID, that is now invalid), then consider a code/text and additional fields.
Partner has a phd. Can confirm she recommends no one ever do it.
She only finished it out of spite, so her paper work no longer has miss/Mrs and no relation to her marriage status.