chatboxai/chatbox · warning · Error
HTML content is empty, nothing to publish.
Error message
HTML content is empty, nothing to publish.
What it means
Thrown by publishToVibedrop() when the html parameter is missing or whitespace-only (after html?.trim()). It prevents posting an empty page to VibeDrop and is the earliest validation before the network request is built.
Source
Thrown at src/renderer/packages/vibedrop.ts:91
if (e instanceof ApiError && typeof e.statusCode === 'number') {
return { status: e.statusCode, json: safeJson(e.responseBody) }
}
throw e
}
}
const response = await ofetch.raw<InlinePublishResponse>(url, {
method: 'POST',
headers: { 'Content-Type': 'application/json', Authorization: `Bearer ${bearer}` },
body,
ignoreResponseError: true,
})
return { status: response.status, json: response._data ?? null }
}
export async function publishToVibedrop(params: PublishToVibedropParams): Promise<VibedropSite> {
const { html, vdKey, title, visibility, slug } = params
if (!html?.trim()) {
throw new Error('HTML content is empty, nothing to publish.')
}
const body: Record<string, unknown> = { html, visibility }
if (title) body.title = title
if (slug) body.slug = slug
const { status, json } = await postJson(`${VIBEDROP_API_ORIGIN}/v1/sites/inline`, body, vdKey)
if (status === 401 || status === 403) {
throw new VibedropAuthError(json?.error?.message || 'VibeDrop authorization failed')
}
if (status === 404 && json?.error?.code === 'slug_not_owned') {
throw new VibedropSlugNotOwnedError('slug no longer owned')
}
if (status >= 400 || !json?.site?.url) {
throw new Error(json?.error?.message || `Failed to publish to VibeDrop (status ${status})`)
}
View on GitHub (pinned to 81571269ad)
Solutions
- Ensure the html content is a non-empty, non-whitespace string before publishing.
- Fix the upstream HTML generator if it returns empty.
- Disable the publish action until content is non-empty.
Defensive patterns
Strategy: validation
Validate before calling
function hasHtmlContent(html: string | undefined | null): boolean {
return typeof html === 'string' && html.trim().length > 0
}
if (!hasHtmlContent(html)) {
// disable publish; do not call publishToVibedrop
} Type guard
function isNonEmptyHtml(html: unknown): html is string {
return typeof html === 'string' && html.trim().length > 0
} Try / catch
try {
await publishToVibedrop(params)
} catch (e) {
if (e instanceof Error && e.message === 'HTML content is empty, nothing to publish.') {
// regenerate content before publishing
}
} Prevention
- Generate and validate HTML before enabling publish.
- Treat empty generator output as an error upstream.
- Disable publish in the UI until content exists.
When it happens
Trigger: Calling publishToVibedrop with html = '', html = ' ', or html = undefined/null. The guard `if (!html?.trim()) throw ...` fires before postJson.
Common situations: The HTML generator returned empty due to an upstream error; a template produced only whitespace; the publish button was enabled with no content generated; programmatic call with an unset html variable.
Related errors
- No authorization code found in the input
- --${name} must be an integer.
- --${name} must be between ${options.min} and ${options.max}.
- Missing setting key.
- email required
AI-assisted analysis of chatboxai/chatbox@81571269ad (2026-08-12).
Data as JSON: /api/errors/2321fcff0fea7f30.
Report an issue: GitHub.