Jira Forge: when exception is thrown, how do we handle app restarts?

Hi team,

What happens when a Jira Forge app throws an exception? Does the app restart or just stop running?

I have an event that triggers whenever a Jira Issue is created or modified. When this happens, I make a subsequent call to Jira REST API. If the response is not 200, should I throw an error and expect the app will restart again? I am looking at this sample app. This app handles the non-200 response by throwing an exception.

Do we need to handle app restart? If so, how could I do this?

(Essentially) Forge apps are started when necessary and shutdown once complete.
If your app fails to handle a particular event and shuts down a new instance will be started to handle other events.

You can see the same process happen with a visual extension like a Confluence macro.
Intentionally make it crash but once you restart the page it’s like it never happened.

Makes sense. Thank you for verifying this.