mirror of
https://github.com/langgenius/dify.git
synced 2026-11-12 22:31:24 +08:00
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
39 lines
1.0 KiB
TypeScript
Generated
39 lines
1.0 KiB
TypeScript
Generated
// This file is auto-generated by scripts/add-orpc-error-maps.ts
|
|
import * as z from 'zod'
|
|
|
|
const zErrorResponse = /* @__PURE__ */ (() =>
|
|
z.object({
|
|
code: z.string(),
|
|
details: z.record(z.string(), z.unknown()).optional(),
|
|
message: z.string(),
|
|
params: z.string().optional(),
|
|
status: z.int(),
|
|
}))()
|
|
|
|
const zUnsupportedDataSourceApiKeyAuthProviderError = /* @__PURE__ */ (() =>
|
|
zErrorResponse.and(
|
|
z.object({
|
|
code: z.literal('unsupported_data_source_api_key_auth_provider'),
|
|
status: z.literal(400),
|
|
}),
|
|
))()
|
|
|
|
const zDataSourceApiKeyAuthProviderUnavailableError = /* @__PURE__ */ (() =>
|
|
zErrorResponse.and(
|
|
z.object({
|
|
code: z.literal('data_source_api_key_auth_provider_unavailable'),
|
|
status: z.literal(502),
|
|
}),
|
|
))()
|
|
|
|
export const postErrors = {
|
|
data_source_api_key_auth_provider_unavailable: {
|
|
status: 502,
|
|
data: zDataSourceApiKeyAuthProviderUnavailableError,
|
|
},
|
|
unsupported_data_source_api_key_auth_provider: {
|
|
status: 400,
|
|
data: zUnsupportedDataSourceApiKeyAuthProviderError,
|
|
},
|
|
}
|