show webhook failure front (#3044)
This commit is contained in:
@@ -138,6 +138,19 @@ function WorkflowRun() {
|
||||
|
||||
const isTaskv2Run = workflowRun && workflowRun.task_v2 !== null;
|
||||
|
||||
const webhookFailureReasonData =
|
||||
workflowRun?.task_v2?.webhook_failure_reason ??
|
||||
workflowRun?.webhook_failure_reason;
|
||||
|
||||
const webhookFailureReason = webhookFailureReasonData ? (
|
||||
<div className="space-y-4">
|
||||
<Label>Webhook Failure Reason</Label>
|
||||
<div className="rounded-md border border-yellow-600 p-4 text-sm">
|
||||
{webhookFailureReasonData}
|
||||
</div>
|
||||
</div>
|
||||
) : null;
|
||||
|
||||
const outputs = workflowRun?.outputs;
|
||||
const extractedInformation =
|
||||
typeof outputs === "object" &&
|
||||
@@ -166,7 +179,10 @@ function WorkflowRun() {
|
||||
|
||||
const showOutputSection =
|
||||
workflowRunIsFinalized &&
|
||||
(hasSomeExtractedInformation || hasFileUrls || hasTaskv2Output) &&
|
||||
(hasSomeExtractedInformation ||
|
||||
hasFileUrls ||
|
||||
hasTaskv2Output ||
|
||||
webhookFailureReasonData) &&
|
||||
workflowRun.status === Status.Completed;
|
||||
|
||||
return (
|
||||
@@ -308,6 +324,7 @@ function WorkflowRun() {
|
||||
</ScrollArea>
|
||||
</div>
|
||||
)}
|
||||
{webhookFailureReason}
|
||||
</div>
|
||||
)}
|
||||
{workflowFailureReason}
|
||||
|
||||
@@ -52,9 +52,22 @@ function WorkflowRunOutput() {
|
||||
const outputs = workflowRun?.outputs;
|
||||
const fileUrls = workflowRun?.downloaded_file_urls ?? [];
|
||||
const observerOutput = workflowRun?.task_v2?.output;
|
||||
const webhookFailureReasonData =
|
||||
workflowRun?.task_v2?.webhook_failure_reason ??
|
||||
workflowRun?.webhook_failure_reason;
|
||||
|
||||
return (
|
||||
<div className="space-y-5">
|
||||
{webhookFailureReasonData ? (
|
||||
<div className="rounded bg-slate-elevation2 p-6">
|
||||
<div className="space-y-4">
|
||||
<h1 className="text-lg font-bold">Webhook Failure Reason</h1>
|
||||
<div className="space-y-2 text-yellow-600">
|
||||
{webhookFailureReasonData}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
) : null}
|
||||
{activeBlock ? (
|
||||
<div className="rounded bg-slate-elevation2 p-6">
|
||||
<div className="space-y-4">
|
||||
|
||||
Reference in New Issue
Block a user