@accelerated-software-development/caddy-api-client - v0.4.3
    Preparing search index...

    Variable ErrorHandlerSchemaConst

    ErrorHandlerSchema: ZodObject<
        { error: ZodOptional<ZodString>; status_code: ZodOptional<ZodString> } & {
            handler: ZodLiteral<"error">;
        },
        "strip",
        ZodTypeAny,
        { error?: string; handler: "error"; status_code?: string },
        { error?: string; handler: "error"; status_code?: string },
    > = ...

    Error handler schema - static error response

    Returns an error response with a specified status code and message. Use this to trigger Caddy's error handling for custom error pages.

    const handler = ErrorHandlerSchema.parse({
    handler: "error",
    error: "Resource not found",
    status_code: "404" // Note: status_code is a string (WeakString)
    });