Hi Jason, thanks for the pointer. I was hoping you could clarify a few things:
I need to patch the status (change it from a 500 to a 200) as well as patch the response (change a HTML response to an empty JSON response). I have the following code in a JS file:
exports['patch response'] = function(args) {
var status = args.status;
if (status == 500) {
log('info', 'Got HTTP 500 '+args.body);
return {
status: 200,
type: 'application/json',
content: JSON.stringify({})
};
}
}
However this doesn't seem to be doing anything - is there a way to debug monkey patches?
Also, where does the log message go?
Thanks,