How To Handle Exception In Typescript