Skip to content

Commit 75d292b

Browse files
committed
magic links on span event errors
1 parent 212f853 commit 75d292b

File tree

1 file changed

+23
-5
lines changed

1 file changed

+23
-5
lines changed

apps/webapp/app/components/runs/v3/SpanEvents.tsx

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1+
import { EnvelopeIcon } from "@heroicons/react/20/solid";
12
import {
23
exceptionEventEnhancer,
34
isExceptionSpanEvent,
45
type ExceptionEventProperties,
56
type SpanEvent as OtelSpanEvent,
67
} from "@trigger.dev/core/v3";
78
import { CodeBlock } from "~/components/code/CodeBlock";
9+
import { Feedback } from "~/components/Feedback";
10+
import { Button } from "~/components/primitives/Buttons";
811
import { Callout } from "~/components/primitives/Callout";
912
import { DateTimeAccurate } from "~/components/primitives/DateTime";
1013
import { Header2, Header3 } from "~/components/primitives/Headers";
@@ -75,11 +78,26 @@ export function SpanEventError({
7578
titleClassName="text-rose-500"
7679
/>
7780
{enhancedException.message && <Callout variant="error">{enhancedException.message}</Callout>}
78-
{enhancedException.link && (
79-
<Callout variant="docs" to={enhancedException.link.href}>
80-
{enhancedException.link.name}
81-
</Callout>
82-
)}
81+
{enhancedException.link &&
82+
(enhancedException.link.magic === "CONTACT_FORM" ? (
83+
<Feedback
84+
button={
85+
<Button
86+
variant="tertiary/medium"
87+
LeadingIcon={EnvelopeIcon}
88+
leadingIconClassName="text-blue-400"
89+
fullWidth
90+
textAlignLeft
91+
>
92+
{enhancedException.link.name}
93+
</Button>
94+
}
95+
/>
96+
) : (
97+
<Callout variant="docs" to={enhancedException.link.href}>
98+
{enhancedException.link.name}
99+
</Callout>
100+
))}
83101
{enhancedException.stacktrace && (
84102
<CodeBlock
85103
showCopyButton={false}

0 commit comments

Comments
 (0)