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.

534 B
Raw Blame
import { getHttpErrorStatus } from '@/service/http-error'
import { knowledgeFsRequestFailureMessageKey } from '../knowledge-fs-task-error'

export async function settingsSaveErrorMessageKey(error: unknown) {
  const status = getHttpErrorStatus(error) ?? (error instanceof Response ? error.status : undefined)
  if (status === undefined) return 'settings.saveFailed' as const
  if (status === 403) return 'permissionRestricted' as const
  return (await knowledgeFsRequestFailureMessageKey(error)) ?? ('settings.saveFailed' as const)
}