elsa-workflows / elsa-workflows/elsa-core
[BUG] HTTP Endpoint with dynamic value in path always yields 200 with no content
- Dominant language
- C#
- Stars
- 7.9k
- Forks
- 1.5k
- Avg merge
- 15h 22m
- Merged PRs (30d)
- 114
Description
## Description
### What I am generally trying to do
I am trying to make an activity which blocks and shows a popup window in an external GUI. In that window, a custom message should be shown. To accomplish this, I split the flow into three branches; two branches which wait for a Yes/No event and a branch with a HTTP Request + Response, which returns the custom message for that workflow. However, as multiple workflows may run at the same time, the HTTP endpoint needs to be unique for the current workflow instance.
### The issue
While entering a static path works fine for the setup, having `getWorkflowInstanceId()` in the path breaks multiple things.
* In the ELSA GUI, the path is correctly expanded:

* Accessing this path via the browser returns `200 OK` with no response body, even if one is set or another response code (i.e. `500`) should be returned.

* **For cross check; accessing any other url yields the expected `404 Not Found`.**

## Steps to Reproduce
1. Create a workflow with a `HTTP Endpoint` and a `HTTP Response`.
2. Set the path of the HTTP endpoint to `${getWorkflowInstanceId()}/test`.
3. Set a body for the HTTP response.
4. Set the status code to something like `InternalServerError`.
5. Run the workflow and access the HTTP endpoint.
### Example workflow json
[http-bug.json](https://github.com/user-attachments/files/16070619/http-bug.json)
This occurs 100% of the time.
## Expected Behavior
Response with status code `500` and the entered body.
## Actual Behavior
Response with status code `200` and no body.
## Screenshots
## Environment
- **Elsa Package Version**: Elsa 3.2
- **Operating System**: Fedora + Podman
- **Browser and Version**: Edge Version 127.0.2651.15 (Official build) beta (64-bit)
## Log Output
Include any relevant log output or error messages that might help diagnose the issue.
Contributor guide
Assessment
This issue has not been assessed yet.