langgenius/dify · error · BaseError

ErrorCode.Unknown

ErrorCode.Unknown

Error message

server returned verification_uri with unsupported scheme "${url.protocol.replace(':', '')}"

What it means

Error "server returned verification_uri with unsupported scheme "${url.protocol.replace(':', '')}"" thrown in langgenius/dify.

Source

Thrown at cli/src/util/host.ts:80

    const u = new URL(raw)
    return u.host !== '' ? u.host : raw
  } catch {
    return raw
  }
}

export function validateVerificationURI(raw: string, insecure: boolean): void {
  let url: URL
  try {
    url = new URL(raw.trim())
  } catch {
    throw new BaseError({
      code: ErrorCode.Unknown,
      message: `server returned invalid verification_uri "${raw}"`,
    })
  }
  if (url.protocol !== 'https:' && !(insecure && url.protocol === 'http:')) {
    throw new BaseError({
      code: ErrorCode.Unknown,
      message: `server returned verification_uri with unsupported scheme "${url.protocol.replace(':', '')}"`,
      hint: 'expected https:// (use --insecure to allow http:// on local-dev hosts)',
    })
  }
  if (url.host === '')
    throw new BaseError({
      code: ErrorCode.Unknown,
      message: `server returned verification_uri without host: "${raw}"`,
    })
}

View on GitHub (pinned to ef8544b173)

When it happens

Trigger: Thrown at cli/src/util/host.ts:80 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of langgenius/dify@ef8544b173 (2026-08-12). Data as JSON: /api/errors/74584b98ad719fda. Report an issue: GitHub.