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.4 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 zAccountInFreezeError = /* @__PURE__ */ (() =>
  zErrorResponse.and(
    z.object({
      code: z.literal('account_in_freeze'),
      status: z.literal(400),
    }),
  ))()

const zEmailDomainSuspendedError = /* @__PURE__ */ (() =>
  zErrorResponse.and(
    z.object({
      code: z.literal('email_domain_suspended'),
      status: z.literal(400),
    }),
  ))()

const zAlreadyActivateError = /* @__PURE__ */ (() =>
  zErrorResponse.and(
    z.object({
      code: z.literal('already_activate'),
      status: z.literal(403),
    }),
  ))()

const zInvitationAccountMismatchError = /* @__PURE__ */ (() =>
  zErrorResponse.and(
    z.object({
      code: z.literal('invitation_account_mismatch'),
      status: z.literal(403),
    }),
  ))()

export const postErrors = {
  account_in_freeze: { status: 400, data: zAccountInFreezeError },
  already_activate: { status: 403, data: zAlreadyActivateError },
  email_domain_suspended: { status: 400, data: zEmailDomainSuspendedError },
  invitation_account_mismatch: { status: 403, data: zInvitationAccountMismatchError },
}