Here are a few steps you can take to debug and resolve this issue:
-
Check the Code for Either Usage: Look through your codebase for instances where Either is used. Ensure that you are handling both Left and Right cases properly. The error suggests that there is an assumption that the Either is always Right, which is not the case.
-
Add Logging: Add logging around the areas where Either is used to print out whether the value is Left or Right. This can help you identify where the unexpected Left value is coming from.
-
Review Recent Changes: If this issue started occurring after recent changes, review those changes to see if any modifications were made to the code handling Either.
-
Check Dependencies: Ensure that all dependencies are correctly specified and that there are no version mismatches that could cause unexpected behavior.
-
Unit Tests: Write unit tests for the functions that return Either to ensure that they handle both Left and Right cases correctly.