Skip to content

Rest API timeout issue #15709

@Srimanitejas123

Description

@Srimanitejas123

Version Information
Version 3.20.120-ee-lts

What is the expected behaviour?
When a REST API query times out on the server side (e.g., returns a 504), the query should fail properly in the UI regardless of the ToolJet timeout setting. The failure state should trigger the onFailure event, stop the loading state, and populate relevant error variables.

What is the current behaviour?
When the query timeout is set to 0, it defaults to ~30 seconds. If the server returns a 504 timeout:

The network request times out in the browser (~30s)
The query continues to stay in a loading state in the UI
The onFailure event is not triggered
No error/response variables are populated

However, when the timeout is explicitly set to a lower value (e.g., 2s), the failure is handled correctly.

How to reproduce the issue?

Create a REST API query that triggers a server-side timeout (returns 504)
Set query timeout in ToolJet to 0
Execute the query
Observe that after ~30 seconds, the browser request times out
Notice that the query remains in loading state and no failure event is triggered
Now set query timeout to a lower value (e.g., 2 seconds)
Execute again and observe that the failure is handled correctly

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions