Reimplement server’s try...catch using resolve