TypeScript Code Error Handling Issue - Effect Community