fix(pipeline): resolve eslint type error in payload migration endpoint
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 14s
Build & Deploy / 🧪 QA (push) Failing after 43s
Build & Deploy / 🏗️ Build (push) Failing after 1m48s
Build & Deploy / 🚀 Deploy (push) Has been skipped
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been skipped
Build & Deploy / 🔔 Notify (push) Successful in 2s

This commit is contained in:
2026-02-27 18:27:02 +01:00
parent d27e1f91ad
commit 39b96a51db

View File

@@ -22,8 +22,14 @@ export async function POST(req: Request) {
success: true,
message: "Migrations executed successfully.",
});
} catch (error: any) {
} catch (error) {
logger.error("Failed to run migrations remotely", { error });
return NextResponse.json({ error: error.message }, { status: 500 });
return NextResponse.json(
{
error:
error instanceof Error ? error.message : "Unknown error occurred",
},
{ status: 500 },
);
}
}