Implement detection of error JSON responses