You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When attempting to deprovision a workflow with a document id that does not exist, a 500 (INTERNAL_SERVER_ERROR) response is given.
How can one reproduce the bug?
Provision a workflow.
Delete the document from the state index with that workflow ID.
Attempt to deprovision the workflow.
[2024-07-25T19:28:08,429][ERROR][o.o.f.t.DeprovisionWorkflowTransportAction] [eb67737de9cbbf02c477726fc8ebf46d] Failed to get workflow state for workflow 3Uqby5ABgrORC4V3o7kx
org.opensearch.flowframework.exception.FlowFrameworkException: Fail to find workflow 3Uqby5ABgrORC4V3o7kx
<trace truncated>
[2024-07-25T19:28:08,429][INFO ][c.a.c.e.logger ] [eb67737de9cbbf02c477726fc8ebf46d] POST /_plugins/_flow_framework/workflow/3Uqby5ABgrORC4V3o7kx/_deprovision - 500 INTERNAL_SERVER_ERROR 74 2
What is the expected behavior?
The wrong workflow ID should return a 400-series error, either not found, or bad request.
Do you have any additional context?
The error is automatically wrapped from the exception thrown in the Get Workflow State action
What is the bug?
When attempting to deprovision a workflow with a document id that does not exist, a 500 (INTERNAL_SERVER_ERROR) response is given.
How can one reproduce the bug?
What is the expected behavior?
The wrong workflow ID should return a 400-series error, either not found, or bad request.
Do you have any additional context?
The error is automatically wrapped from the exception thrown in the Get Workflow State action
flow-framework/src/main/java/org/opensearch/flowframework/transport/DeprovisionWorkflowTransportAction.java
Lines 108 to 126 in 034dff7
That should be using this workflow state 404 error:
flow-framework/src/main/java/org/opensearch/flowframework/transport/GetWorkflowStateTransportAction.java
Line 86 in 034dff7
This exception is then passed to
ExceptionsHelper.status()
which does not understand theFlowFrameworkException
type.Best fix is to change
FlowFrameworkException
to extendOpenSearchException
and overridestatus()
so we can hit this line:See code for
OpenSearchStatusException
and adapt.The text was updated successfully, but these errors were encountered: