Skip to content

Commit c06dc07

Browse files
committed
Log SIWA escalation failure error message
1 parent b371bf9 commit c06dc07

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

apps/dashboard/src/@/api/support.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export async function createSupportTicket(params: {
6161
try {
6262
const siwaUrl = process.env.NEXT_PUBLIC_SIWA_URL;
6363
if (siwaUrl) {
64-
await fetch(`${siwaUrl}/v1/chat/feedback`, {
64+
const res = await fetch(`${siwaUrl}/v1/chat/feedback`, {
6565
method: "POST",
6666
headers: {
6767
"Content-Type": "application/json",
@@ -73,6 +73,12 @@ export async function createSupportTicket(params: {
7373
feedbackRating: ESCALATION_FEEDBACK_RATING,
7474
}),
7575
});
76+
77+
if (!res.ok) {
78+
// Log error but don't fail the ticket creation
79+
const errorMessage = await res.text();
80+
console.error("Failed to escalate to SIWA feedback:", errorMessage);
81+
}
7682
}
7783
} catch (error) {
7884
// Log error but don't fail the ticket creation

0 commit comments

Comments
 (0)