# Queue Failed Function Calls: Retry Later

**URL:** <https://forum.inductiveautomation.com/t/queue-failed-function-calls-retry-later/75605>\
**Category:** Ignition\
**Tags:** scripting\
**Created:** [June 27, 2023, 7:40pm UTC](https://forum.inductiveautomation.com/t/queue-failed-function-calls-retry-later/75605 "2023-06-27T19:40:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dkhayes117](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dkhayes117/32/68344_2.png) [@dkhayes117](https://forum.inductiveautomation.com/u/dkhayes117)\
**Post date:** [June 27, 2023, 7:40pm UTC](https://forum.inductiveautomation.com/t/queue-failed-function-calls-retry-later/75605/1 "2023-06-27T19:40:05Z")

</div>

We have an IBM AS400 system that I make API calls to in certain project scripts. In the event the 400 is down, I will get a `Timeout Exception`. Some of these function calls I want to buffer and retry once the connection is re-established. What's the best way to handle this? I've started experimenting with a Java `LinkedBlockingQueue`. My question is what's the idiomatic way to capture the function call for retry.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [June 27, 2023, 7:48pm UTC](https://forum.inductiveautomation.com/t/queue-failed-function-calls-retry-later/75605/2 "2023-06-27T19:48:27Z")

</div>

> [@dkhayes117](#):
>
> the idiomatic way

I don't think there is one. Just careful use of `try: except:` to capture the error and place the function call parameters into another queue.
