More accurate error detection from API returned data