Seeking Help with Logging Errors in tryPromise Catch Statement
Hey team, I feel like I am doing something fundamentally wrong here. What I am trying to do is simply Effect.logError inside the tryPromise catch statement:
What is happening is that
-
So that when I run my insertUser Effect, I cannot catchAll and recognize the code
Previously I tried to log an error directly in my .catch without using a Gen function.
I think I am doing or thinking about this in the wrong way.
What is the cleanest approach to log inside Effect?
What is happening is that
-
return new DAOError("User row already exists", err, "UNIQUE_CONSTRAINT"); is returning an Effect to my EffectSo that when I run my insertUser Effect, I cannot catchAll and recognize the code
Property 'code' does not exist on type 'Effect<DAOError, never, never>'.ts(2339)
Previously I tried to log an error directly in my .catch without using a Gen function.
I think I am doing or thinking about this in the wrong way.
What is the cleanest approach to log inside Effect?
