Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

1.0 KB
Raw Blame
// 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,
  },
}