[core] protect api call with try