Handling ConfigError in Effect Layer with SqliteDbLive
In this case, I provide the SqliteDbLive to the Effect. But the SqliteDbLive might throw ConfigError.
So I got this error.
src/routers/Engineers.ts|43 col 14-29 error| Type 'Layer<ApiGroup<"engineers">, ConfigError, never>' is not assignable to type 'Layer<ApiGroup<"engineers">, never, never>'. Type 'ConfigError' is not assignable to type 'never'. Type 'And' is not assignable to type 'never'.
I would like to return HTTP 500 on Config Error case. How can I handle like that?
If that is not the best way to do, how can I improve the code?
So I got this error.
src/routers/Engineers.ts|43 col 14-29 error| Type 'Layer<ApiGroup<"engineers">, ConfigError, never>' is not assignable to type 'Layer<ApiGroup<"engineers">, never, never>'. Type 'ConfigError' is not assignable to type 'never'. Type 'And' is not assignable to type 'never'.
I would like to return HTTP 500 on Config Error case. How can I handle like that?
If that is not the best way to do, how can I improve the code?
