[api] fix returning debug info