badges/shields · error · NotFound
resource not found
Error message
resource not found
What it means
The VoxelShop downloads badge handle() throws a plain NotFound when the fetched API response has no resource object. There is no prettyMessage, so the badge framework supplies its default 'resource not found' text. It means VoxelShop returned valid data but no resource matching the given resourceId.
Source
Thrown at services/voxelshop/voxelshop-downloads.service.js:34
get: {
summary: 'Voxel Shop Downloads',
description,
parameters: pathParams({
name: 'resourceId',
example: '323',
}),
},
},
}
static defaultBadgeData = {
label: 'downloads',
}
async handle({ resourceId }) {
const { response } = await this.fetch({ resourceId })
if (!response.resource) {
throw new NotFound()
}
return renderDownloadsBadge({ downloads: response.resource.downloads })
}
}
View on GitHub (pinned to 766fd8bc89)
Solutions
- Verify the resourceId against the resource's URL on voxel.shop.
- Confirm the resource still exists and is publicly visible.
- Update or remove the badge if the asset was deleted.
Example fix
// before /badge/voxelshop/downloads/999999 // after /badge/voxelshop/downloads/12345
Defensive patterns
Strategy: try-catch
Validate before calling
if (!resourceId || !/^\d+$/.test(resourceId)) throw new Error('valid numeric voxel.shop resourceId required') Type guard
const hasResource = (r) => typeof r === 'object' && r !== null && 'resource' in r
Try / catch
try { renderDownloadsBadge() } catch (e) { if (e instanceof NotFound) return 'resource unavailable'; throw e } Prevention
- Take the resource id from the resource page URL on voxel.shop.
- Periodically audit embedded badges for deleted resources.
- Prefer linking resources likely to remain public and maintained.
When it happens
Trigger: Fetching the voxelshop downloads badge with a resourceId for which the VoxelShop API response lacks response.resource (resource deleted, wrong id, or private/hidden resource).
Common situations: Resource removed by its author on voxel.shop; typo in the resource id; the id coming from a stale link to a deleted asset.
Related errors
AI-assisted analysis of badges/shields@766fd8bc89 (2026-08-30).
Data as JSON: /api/errors/1d56cb5c596b41f1.
Report an issue: GitHub.