Make notifyOnError handler try to parse response as JSON