mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-09-14 02:42:24 +03:00
fix(relay): consolidate the bifrost error-helper imports
The previous commit added `buildErrorBody`/`sanitizeErrorMessage` and pulled `parseUpstreamError` from `handlers/usageExtractor`, where it does not live — it is exported from `utils/error.ts` alongside the other two. That produced TS2300 (duplicate `buildErrorBody`, already imported below) and TS2305 on the same route, caught by check:api-typecheck. One import from utils/error.ts for all three. check:api-typecheck now reports OK — 289 pre-existing errors, all within the frozen baseline (was FAIL with 2 new/regressed). Relay tests 6/6, prettier clean.
This commit is contained in:
@@ -30,11 +30,13 @@
|
||||
|
||||
import { CORS_HEADERS, handleCorsOptions } from "@/shared/utils/cors";
|
||||
import { stripSensitiveResponseHeaders } from "@omniroute/open-sse/utils/upstreamResponseHeaders";
|
||||
import { buildErrorBody, sanitizeErrorMessage } from "@omniroute/open-sse/utils/error";
|
||||
import { parseUpstreamError } from "@omniroute/open-sse/handlers/usageExtractor";
|
||||
import { createInjectionGuard } from "@/middleware/promptInjectionGuard";
|
||||
import { getRelayTokenByHash, checkRateLimit, recordRelayUsage } from "@/lib/db/relayProxies";
|
||||
import { buildErrorBody } from "@omniroute/open-sse/utils/error";
|
||||
import {
|
||||
buildErrorBody,
|
||||
parseUpstreamError,
|
||||
sanitizeErrorMessage,
|
||||
} from "@omniroute/open-sse/utils/error";
|
||||
import { getProviderPluginManifestHeader } from "@omniroute/open-sse/config/providerPluginManifestUrl.ts";
|
||||
import { z } from "zod";
|
||||
import {
|
||||
|
||||
Reference in New Issue
Block a user