{"record":{"id":"031900f576255217","repo":"different-ai/openwork","slug":"must-include-a-hostname","errorCode":null,"errorMessage":"must include a hostname","messagePattern":"must include a hostname","errorType":"validation","errorClass":"ObservabilityConfigError","httpStatus":null,"severity":"error","filePath":"ee/packages/utils/src/observability.ts","lineNumber":168,"sourceCode":"  if (!trimmed) {\n    throw new ObservabilityConfigError(\"service name is required\")\n  }\n  return trimmed\n}\n\nfunction validateHttpUrl(value: string, envKey: string): string {\n  let parsed: URL\n  try {\n    parsed = new URL(value)\n  } catch {\n    throw new ObservabilityConfigError(\"must be an absolute http(s) URL\", envKey)\n  }\n\n  if (parsed.protocol !== \"http:\" && parsed.protocol !== \"https:\") {\n    throw new ObservabilityConfigError(\"must use http or https\", envKey)\n  }\n  if (!parsed.hostname) {\n    throw new ObservabilityConfigError(\"must include a hostname\", envKey)\n  }\n\n  return value\n}\n\nfunction validateSentryDsn(value: string): string {\n  validateHttpUrl(value, \"SENTRY_DSN\")\n\n  const parsed = new URL(value)\n  if (!parsed.username) {\n    throw new ObservabilityConfigError(\"must include a public key\", \"SENTRY_DSN\")\n  }\n\n  const projectId = parsed.pathname.split(\"/\").filter(Boolean).at(-1)\n  if (!projectId) {\n    throw new ObservabilityConfigError(\"must include a project id\", \"SENTRY_DSN\")\n  }\n","sourceCodeStart":150,"sourceCodeEnd":186,"githubUrl":"https://github.com/different-ai/openwork/blob/2b7df46e8ae1517d64c896c7793d2d52ec845669/ee/packages/utils/src/observability.ts#L150-L186","documentation":"Error \"must include a hostname\" thrown in different-ai/openwork.","triggerScenarios":"Thrown at ee/packages/utils/src/observability.ts:168 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"}