fix #4268179103100 properly handle api errors