How to solve the limit of calls exceeding 25 seconds in development?

Calling an API in an application often takes more than 25 seconds, so that an error message is returned.

Hi @Zhangyesen ,

You can split the processing across multiple invocations using the Async Events API.

Regards,
Dugald

Hi @dmorrow,
Thank you for the quick reply.
Whether the Async Events API can be used in the Custom UI, and if not, whether it can only be used in the SaaS function, because I always have errors when using it But not in UI Kit.

Hi @Zhangyesen ,

The Async Events API is a feature of the Forge runtime. UI Kit rendering occurs within the Forge runtime, but Custom UI rendering occurs on the client side (e.g. web browser). Just like any other iframe, you can have long running tasks within your Custom UI iframe. If, however, the processing needs to occur in the back end, your Custom UI iframe can invoke your Forge function which can then utilise the Async Events API if necessary.

Regards,
Dugald

Hi @dmorrow,

I want to ask you two questions.
First, Async Events API does not support api.asUser().requestJira(), otherwise will be prompted NEEDS_ AUTHENTICATION_ ERR .
Second, my Async Events API always prompts TUNNEL_ SERVER_ UNREACHABLE, but it was not captured by try… catch…, and no error was reported in the tunnel log.



Hi @Zhangyesen ,

Good callout regarding the async event API not supporting api.asUser(). This gap is captured by [FRGE-805] - Ecosystem Jira.

For your second issue, you may like to report this in the FRGE project.

Regards,
Dugald

OK,Thank you for your reply.