Report errors as JSON.