JuliusBrussee/caveman · error
${label} is required
Error message
${label} is required What it means
Error "${label} is required" thrown in JuliusBrussee/caveman.
Source
Thrown at packages/mastra/src/index.ts:811
* The Caveman dashboard trace page: `{baseUrl}/traces/{traceId}?project_id=…`.
*
* The dashboard currently resolves the project from the workspace switcher and
* ignores the query parameter; it is carried so the link is unambiguous about
* which project's trace it means.
*/
export function cavemanTraceLink(baseUrl: string, projectId: string, traceId: string): string {
const base = requireBaseUrl(baseUrl, "cavemanTraceLink: baseUrl");
const project = requireNonEmpty(projectId, "cavemanTraceLink: projectId");
const trace = requireNonEmpty(traceId, "cavemanTraceLink: traceId");
return `${base}/traces/${encodeURIComponent(trace)}?project_id=${encodeURIComponent(project)}`;
}
// ---------------------------------------------------------------------------
// Shared helpers
// ---------------------------------------------------------------------------
function requireNonEmpty(value: string | undefined, label: string): string {
if (typeof value !== "string" || value.trim() === "") throw new Error(`${label} is required`);
return value.trim();
}
function requireBaseUrl(value: string | undefined, label: string): string {
const raw = requireNonEmpty(value, label);
let parsed: URL;
try {
parsed = new URL(raw);
} catch {
throw new Error(`${label} must be an absolute http(s) URL`);
}
// Credentials ride every request to this host. Plain http is allowed only
// for loopback development targets — anywhere else the key or session token
// would transit unencrypted to a caller-chosen host.
const loopback = parsed.hostname === "localhost" || parsed.hostname === "127.0.0.1" || parsed.hostname === "::1" || parsed.hostname === "[::1]";
if (parsed.protocol === "http:" && !loopback) {
throw new Error(`${label} must use https (plain http is allowed only for localhost)`);
}View on GitHub (pinned to 27d5a3981a)
Solutions
- Provide a non-empty value for the indicated field.
When it happens
Trigger: Thrown at packages/mastra/src/index.ts:811 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of JuliusBrussee/caveman@27d5a3981a (2026-08-15).
Data as JSON: /api/errors/7685ff338b41410a.
Report an issue: GitHub.