{"record":{"id":"bfdd8bcb0d67265c","repo":"supabase/supabase","slug":"failed-to-send-to-slack","errorCode":null,"errorMessage":"Failed to send to Slack","messagePattern":"Failed to send to Slack","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"apps/www/app/api-v2/opt-out/[ref]/route.ts","lineNumber":92,"sourceCode":"    )\n  }\n\n  try {\n    const { error: supabaseError } = await supabase\n      .from('manual_reports')\n      .insert([{ project_ref: ref, reason, email }])\n\n    if (supabaseError) {\n      throw new Error(`Supabase error: ${supabaseError.message}`)\n    }\n\n    const response = await fetch(process.env.EMAIL_REPORT_SLACK_WEBHOOK as string, {\n      method: 'POST',\n      headers: { 'Content-Type': 'application/json' },\n      body: JSON.stringify({ text: `New report from: ${ref} \\n\\n ${reason}` }),\n    })\n\n    if (!response.ok) throw new Error('Failed to send to Slack')\n\n    return NextResponse.json(\n      { message: 'Thank you! We have received your report.' },\n      { status: 200 }\n    )\n  } catch (error) {\n    Sentry.captureException(error)\n    const errorMessage = (error as Error).message\n    return NextResponse.json(\n      { error: `Failure: Could not send post to Slack. Error: ${errorMessage}` },\n      { status: 500 }\n    )\n  }\n}\n","sourceCodeStart":74,"sourceCodeEnd":107,"githubUrl":"https://github.com/supabase/supabase/blob/beee91b9c2228dd57302dec75c733baaa84ab543/apps/www/app/api-v2/opt-out/[ref]/route.ts#L74-L107","documentation":"Error \"Failed to send to Slack\" thrown in supabase/supabase.","triggerScenarios":"Thrown at apps/www/app/api-v2/opt-out/[ref]/route.ts:92 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"beee91b9c2228dd57302dec75c733baaa84ab543","analyzedAt":"2026-08-12T06:51:48.935Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}