Stricter API response check before throwing error