Mind-blowing code and seeking better solution for error handling - Effect Community