diff --git a/src/app/(dynamic-pages)/(authenticated-pages)/(application-pages)/project/[projectSlug]/runs/[runId]/ProjectRunDetails.tsx b/src/app/(dynamic-pages)/(authenticated-pages)/(application-pages)/project/[projectSlug]/runs/[runId]/ProjectRunDetails.tsx
index a0fb9815..97f54388 100644
--- a/src/app/(dynamic-pages)/(authenticated-pages)/(application-pages)/project/[projectSlug]/runs/[runId]/ProjectRunDetails.tsx
+++ b/src/app/(dynamic-pages)/(authenticated-pages)/(application-pages)/project/[projectSlug]/runs/[runId]/ProjectRunDetails.tsx
@@ -65,6 +65,7 @@ function RenderContent({
run.status !== ToTitleCase('running_plan') && (
{tfOutput}
+ {run.status === ToTitleCase("failed") && run.failure_reason}
)}
@@ -106,6 +107,7 @@ function RenderContent({
{run.status === ToTitleCase('succeeded') && (
{applyTerraformOutput}
+ {run.status === ToTitleCase("failed") && run.failure_reason}
)}
diff --git a/src/app/api/github-callback/route.ts b/src/app/api/github-callback/route.ts
index 7d1b7b4c..afef9fc0 100644
--- a/src/app/api/github-callback/route.ts
+++ b/src/app/api/github-callback/route.ts
@@ -3,11 +3,11 @@ import { toSiteURL } from '@/utils/helpers';
import { NextRequest, NextResponse } from 'next/server';
// Use the environment variable for the callback URL
-const AUTH_SERVICE_URL = process.env.GITHUB_PROXY_CALLBACK_URL;
+const GITHUB_CALLBACK_URL = process.env.GITHUB_PROXY_CALLBACK_URL;
const DIGGER_WEBHOOK_SECRET = process.env.DIGGER_WEBHOOK_SECRET;
-if (!AUTH_SERVICE_URL) {
- throw new Error('GITHUB_CALLBACK_URL environment variable is not set');
+if (!GITHUB_CALLBACK_URL) {
+ throw new Error('GITHUB_PROXY_CALLBACK_URL environment variable is not set');
}
export async function GET(request: NextRequest) {
@@ -28,7 +28,7 @@ export async function GET(request: NextRequest) {
);
const organizationId = await getOrganizationId();
const response = await fetch(
- `${AUTH_SERVICE_URL}?${searchParams.toString()}`,
+ `${GITHUB_CALLBACK_URL}?${searchParams.toString()}`,
{
method: 'GET',
headers: {
diff --git a/src/lib/database.types.ts b/src/lib/database.types.ts
index c711280f..5c1352db 100644
--- a/src/lib/database.types.ts
+++ b/src/lib/database.types.ts
@@ -452,6 +452,7 @@ export type Database = {
created_at: string
deleted_at: string | null
digger_config: string | null
+ failure_reason: string | null
github_installation_id: number | null
id: string
is_approved: boolean | null
@@ -477,6 +478,7 @@ export type Database = {
created_at?: string
deleted_at?: string | null
digger_config?: string | null
+ failure_reason?: string | null
github_installation_id?: number | null
id?: string
is_approved?: boolean | null
@@ -502,6 +504,7 @@ export type Database = {
created_at?: string
deleted_at?: string | null
digger_config?: string | null
+ failure_reason?: string | null
github_installation_id?: number | null
id?: string
is_approved?: boolean | null