Cursor gemini model doesnt do the fix on the first try

Here is the last few lines of the output of gemini when I request it to do something:

I will modify the code to display the error message if isError is an Error object, or a generic message otherwise.

After this, the agent just fails and returns early.