hcengineering/platform · error · NotFoundError
Not Found
Error message
Not Found
What it means
statBlob looks up the blob in the storage adapter (storage.stat). If the storage adapter returns undefined the blob does not exist for the workspace, and the service throws NotFoundError. This is the preview service's canonical 'no such object' response for metadata/thumbnail requests.
Source
Thrown at pods/preview/src/service.ts:138
return {
filePath: thumbPath,
mimeType: contentType
}
})
})
}
@withContext('stat-blob')
async statBlob (ctx: MeasureContext, workspace: WorkspaceUuid, name: string): Promise<Blob> {
const wsId = { uuid: workspace } as any
const stat = await this.storage.stat(ctx, wsId, name)
if (stat !== undefined) {
return stat
}
throw new NotFoundError()
}
findProvider (ctx: MeasureContext, contentType: string): PreviewProvider {
const provider = this.providers.find((it) => it.supports(contentType))
if (provider != null) {
return provider
}
throw new BadRequestError(`Unsupported content type: ${contentType}`)
}
private imageKey (workspaceId: string, name: string): string {
return `image/${workspaceId}/${name}`
}
private thumbnailKey (workspaceId: string, name: string, params: ThumbnailParams): string {
return `thumbnail/${workspaceId}/${name}-${params.width}-${params.height}-${params.format}`
}View on GitHub (pinned to 63e28dc964)
Solutions
- Verify the blob name and workspace uuid against the record in your application DB.
- Confirm the object exists in the underlying storage (S3/MinIO bucket) under that key.
- Ensure upload completed before requesting the preview; retry after the upload finishes.
- Check that the preview service is configured against the same storage adapter/workspace as the uploading service.
Example fix
// before
const meta = await preview.metadata(ctx, workspace, name)
// after
const stat = await storage.stat(ctx, { uuid: workspace }, name)
if (stat === undefined) return null // skip preview for missing blob
const meta = await preview.metadata(ctx, workspace, name) Defensive patterns
Strategy: validation
Validate before calling
const stat = await storage.stat(ctx, { uuid: workspace }, name)
if (stat === undefined) {
return null // blob gone; skip preview request entirely
} Try / catch
try {
const meta = await preview.metadata(ctx, workspace, name)
} catch (err) {
if (err.name === 'NotFoundError' || /not found/i.test(err.message)) return null
throw err
} Prevention
- Confirm name/workspace before calling; do not reuse names after deletion.
- Ensure upload completion precedes preview requests.
- Point the preview service at the same storage backend as uploads.
- Handle 404 as an expected outcome for deleted blobs.
When it happens
Trigger: Calling the preview metadata or thumbnail endpoint with a workspace/name pair that has no corresponding object in storage — wrong or stale blob name, blob deleted, wrong workspace uuid, or storage backend connectivity returning no object.
Common situations: Clients caching blob names after deletion, typos in name/uuid, cross-environment storage (e.g. pointing at a bucket without the uploaded object), race where upload has not completed before preview is requested.
Related errors
- Cannot create message, group not found: cardId = ${event.car
- Missing response body
- Network error ${error}
- await response.text()
- Storage error ${error.error}
AI-assisted analysis of hcengineering/platform@63e28dc964 (2026-08-29).
Data as JSON: /api/errors/2363324799bd11ac.
Report an issue: GitHub.