{"record":{"id":"9c6be54745dcbd6d","repo":"langgenius/dify","slug":"unsupporteddslmode-9c6be5","errorCode":"unsupportedDslMode","errorMessage":"unsupportedDslMode","messagePattern":"unsupportedDslMode","errorType":"error_code","errorClass":"CreateReleaseSubmissionBlockedError","httpStatus":null,"severity":"error","filePath":"web/features/deployments/create-release/state/index.ts","lineNumber":534,"sourceCode":"  const submittedReleaseName = value.releaseName.trim()\n\n  if (get(isCheckingCreateReleaseContentAtom) || !submittedReleaseName) return undefined\n\n  if (get(createReleaseHasNameConflictAtom)) return undefined\n\n  if (!canCheckReleaseSourceContent(get) || !get(createReleaseContentReadyAtom)) return undefined\n\n  const appInstanceId = requiredAppInstanceId(get)\n  const commonCreateReleaseRequest = {\n    appInstanceId,\n    displayName: submittedReleaseName,\n    description: value.releaseDescription.trim() || undefined,\n    createAppInstance: false,\n  }\n\n  if (releaseSourceMode === 'dsl') {\n    if (!get(createReleaseIsWorkflowDslContentAtom))\n      throw new CreateReleaseSubmissionBlockedError('unsupportedDslMode')\n\n    return await get(createReleaseMutationAtom).mutateAsync({\n      body: {\n        ...commonCreateReleaseRequest,\n        dsl: get(createReleaseEncodedDslContentAtom),\n      },\n    })\n  }\n\n  if (!sourceAppId) return undefined\n\n  return await get(createReleaseMutationAtom).mutateAsync({\n    body: {\n      ...commonCreateReleaseRequest,\n      sourceAppId,\n    },\n  })\n})","sourceCodeStart":516,"sourceCodeEnd":552,"githubUrl":"https://github.com/langgenius/dify/blob/ef8544b173fd6cd7a8e71df2cab576e52bebbfbc/web/features/deployments/create-release/state/index.ts#L516-L552","documentation":"Thrown by the create-release submission atom when releaseSourceMode is 'dsl' but createReleaseIsWorkflowDslContentAtom is false. The release DSL import path only accepts workflow DSL content; if the parsed/provided DSL does not validate as workflow DSL, submission is blocked with the 'unsupportedDslMode' reason via CreateReleaseSubmissionBlockedError.","triggerScenarios":"Triggered when the user selects DSL import mode but supplies a chatflow DSL, agent DSL, or malformed/non-workflow DSL file, so createReleaseIsWorkflowDslContentAtom resolves false.","commonSituations":"User exports a chatflow app DSL and tries to import it through the release flow that only accepts workflow DSL, the DSL version is incompatible with the current parser, or the content readiness atom passed but the workflow-type check did not.","solutions":["Confirm the DSL file being imported is a workflow app export (check the 'mode' or 'app' field in the DSL JSON).","If importing a chatflow, route through the chatflow-compatible release path instead.","Pre-validate the DSL content type before enabling submit, and show a clear 'workflow DSL required' message.","Ensure createReleaseContentReadyAtom and createReleaseIsWorkflowDslContentAtom are derived from the same parsed payload to avoid divergence."],"exampleFix":"// before\nif (releaseSourceMode === 'dsl') {\n  if (!get(createReleaseIsWorkflowDslContentAtom))\n    throw new CreateReleaseSubmissionBlockedError('unsupportedDslMode')\n\n// after - gate the UI and give a reason\nif (releaseSourceMode === 'dsl' && !get(createReleaseIsWorkflowDslContentAtom)) {\n  set(createReleaseDslModeErrorAtom, 'workflow-dsl-required')\n  return undefined\n}","handlingStrategy":"validation","validationCode":"// Validate DSL is workflow-type before enabling submit\nconst isWorkflowDsl = useAtomValue(createReleaseIsWorkflowDslContentAtom)\nconst canSubmit = releaseSourceMode !== 'dsl' || isWorkflowDsl","typeGuard":"function isWorkflowDslContent(parsed: unknown): boolean {\n  return !!parsed && typeof parsed === 'object'\n    && (parsed as { app?: { mode?: string } }).app?.mode === 'workflow'\n}","tryCatchPattern":"try {\n  await submitCreateRelease(value)\n} catch (e) {\n  if (e instanceof CreateReleaseSubmissionBlockedError && e.reason === 'unsupportedDslMode') {\n    setDslError('Only workflow DSL is supported for release import.')\n    return\n  }\n  throw e\n}","preventionTips":["Disable the DSL import submit button when createReleaseIsWorkflowDslContentAtom is false.","Show the detected DSL app.mode to the user so they understand the mismatch.","Derive createReleaseContentReadyAtom and the workflow-type atom from the same parsed source.","Reject chatflow/agent DSL files at the file-accept step with a clear message."],"tags":["frontend","release","dsl","state-management","jotai"],"backgroundTag":null,"analyzedSha":"ef8544b173fd6cd7a8e71df2cab576e52bebbfbc","analyzedAt":"2026-08-12T05:15:17.394Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}