How do I handle timeout from a plugin SSA?

I’m writing a plugin that uses OpenAI’s API in a server side action and returns results. I use a try / catch for error handling and most of the time if the request fails I’ll catch the error and return it and I can handle that in my app. However, sometimes it times out and I’m only able to catch that in the app with a generic unhandled error catcher:

It looks like Bubble is just timing this out? Is there a more controlled way to catch this error so that I can handle it specifically?

Yes. Back-end processing using SSA is definitely not the right architecture to connect with LLM. Better to leverage API Connector.

Stop your script right before 30 seconds duration.

1 Like

Thanks, you’re right - I refactored to rely on the API connector for each call and it’s much easier to deal with and I can poll in Bubble instead of just wait for a plugin.

1 Like