diff --git a/app/sendReport.js b/app/sendReport.js index c792cea..8ddb95a 100644 --- a/app/sendReport.js +++ b/app/sendReport.js @@ -35,10 +35,17 @@ async function sendReport(params) { } } - const response = await fetch(process.env.BUG_REPORT_URL, { + const reportUrl = process.env.BUG_REPORT_URL; + const reportApiKey = process.env.BUG_REPORT_API_KEY; + + if (!reportUrl || !reportApiKey) { + throw new Error("Bug report service is not configured. Missing BUG_REPORT_URL or BUG_REPORT_API_KEY on backend."); + } + + const response = await fetch(reportUrl, { method: "POST", headers: { - "X-Api-Key": process.env.BUG_REPORT_API_KEY + "X-Api-Key": reportApiKey }, body: formData });