providers: handle invalid JSON responses