JSON error responses
Repair all unit tests (including changed expectations and error codes)