Javascript Return Error From Async Function Python