{"record":{"id":"6e5d59268744b052","repo":"different-ai/openwork","slug":"den-base-url-must-use-http-or-https","errorCode":null,"errorMessage":"DEN_BASE_URL must use http or https.","messagePattern":"DEN_BASE_URL must use http or https\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"ee/packages/utils/src/den-urls.ts","lineNumber":30,"sourceCode":"  [key: string]: string | undefined\n  DEN_BASE_URL?: string\n}\n\nconst DEFAULT_PROTOCOL = \"https:\"\n\nfunction readDenBaseUrl(env: DenUrlEnvironment): string {\n  const value = env.DEN_BASE_URL?.trim()\n  if (!value) {\n    throw new Error(\"DEN_BASE_URL must be configured.\")\n  }\n  return value\n}\n\nfunction parseDenBaseUrl(value: string): URL {\n  const candidate = value.includes(\"://\") ? value : `${DEFAULT_PROTOCOL}//${value}`\n  const url = new URL(candidate)\n  if (url.protocol !== \"http:\" && url.protocol !== \"https:\") {\n    throw new Error(\"DEN_BASE_URL must use http or https.\")\n  }\n  if (url.pathname !== \"/\" || url.search || url.hash) {\n    throw new Error(\"DEN_BASE_URL must be an origin without a path, query, or hash.\")\n  }\n  return url\n}\n\nfunction originFromUrl(url: URL): string {\n  return url.origin.replace(/\\/+$/, \"\")\n}\n\nfunction apiUrlFor(baseUrl: URL): URL {\n  const apiUrl = new URL(baseUrl.href)\n  apiUrl.hostname = `api.${baseUrl.hostname}`\n  return apiUrl\n}\n\nfunction joinUrl(baseUrl: string, path: string): string {","sourceCodeStart":12,"sourceCodeEnd":48,"githubUrl":"https://github.com/different-ai/openwork/blob/2b7df46e8ae1517d64c896c7793d2d52ec845669/ee/packages/utils/src/den-urls.ts#L12-L48","documentation":"Error \"DEN_BASE_URL must use http or https.\" thrown in different-ai/openwork.","triggerScenarios":"Thrown at ee/packages/utils/src/den-urls.ts:30 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2b7df46e8ae1517d64c896c7793d2d52ec845669","analyzedAt":"2026-09-01T07:59:23.713Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}