fix bug when api info fails to load

Signed-off-by: Yuan Cao <mail@caoyuan.me>