feat(backend): complete AI and business migration

This commit is contained in:
poyrazavsever
2026-07-17 09:12:45 +03:00
parent 42f165b27e
commit 64a5f96872
23 changed files with 1286 additions and 409 deletions
+12
View File
@@ -0,0 +1,12 @@
import "server-only";
import { NextResponse } from "next/server";
import { normalizeAiError } from "./provider";
export function aiJsonError(error: unknown): NextResponse {
const normalized = normalizeAiError(error);
return NextResponse.json(
{ error: normalized.message, code: normalized.code },
{ status: normalized.status },
);
}