My Cloud Code API is throwing an error, but it is hard to find out why

In my App 66C2DBD4-189A-7377-FF95-915D98235700 I have a service method that throws an error at a certain input condition. It is in a loop where the loop counter does not find an element. This happens in the mid of the list execution where enough elements should still be existent. I have set Loggers and print statements to find the error, but the statements are not executed or are not shown in the logging files.

The service is Listing, the upsertAnnual… method. Try it with the parameter CH0110240600

What can I do? I am happy for any help.

Regards, Joerg

Hi Joerg,

Try putting the login into a try/catch block and log the error in the “catch” connector.


It is a repeat-while loop. I put it into a try-catch-block and the error disappeared. I could not believe it. So I tried it again without the try-catch. Boom, error back again. With the try-catch-block, error disappeared.

I have no explanation for this. But, hey, thank you for that. It works.

Regards, Joerg

Do you log the error in the “catch” connector?

Yes, I did, but there was no error anymore.