結果 : api error handling in typescript