{"record":{"id":"1d56cb5c596b41f1","repo":"badges/shields","slug":"resource-not-found","errorCode":null,"errorMessage":"resource not found","messagePattern":"resource not found","errorType":"exception","errorClass":"NotFound","httpStatus":404,"severity":"error","filePath":"services/voxelshop/voxelshop-downloads.service.js","lineNumber":34,"sourceCode":"      get: {\n        summary: 'Voxel Shop Downloads',\n        description,\n        parameters: pathParams({\n          name: 'resourceId',\n          example: '323',\n        }),\n      },\n    },\n  }\n\n  static defaultBadgeData = {\n    label: 'downloads',\n  }\n\n  async handle({ resourceId }) {\n    const { response } = await this.fetch({ resourceId })\n    if (!response.resource) {\n      throw new NotFound()\n    }\n    return renderDownloadsBadge({ downloads: response.resource.downloads })\n  }\n}\n","sourceCodeStart":16,"sourceCodeEnd":39,"githubUrl":"https://github.com/badges/shields/blob/766fd8bc89a90b8534dc573ab72dec30215ab1ec/services/voxelshop/voxelshop-downloads.service.js#L16-L39","documentation":"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.","triggerScenarios":"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).","commonSituations":"Resource removed by its author on voxel.shop; typo in the resource id; the id coming from a stale link to a deleted asset.","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."],"exampleFix":"// before\n/badge/voxelshop/downloads/999999\n// after\n/badge/voxelshop/downloads/12345","handlingStrategy":"try-catch","validationCode":"if (!resourceId || !/^\\d+$/.test(resourceId)) throw new Error('valid numeric voxel.shop resourceId required')","typeGuard":"const hasResource = (r) => typeof r === 'object' && r !== null && 'resource' in r","tryCatchPattern":"try { renderDownloadsBadge() } catch (e) { if (e instanceof NotFound) return 'resource unavailable'; throw e }","preventionTips":["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."],"tags":["not-found","badges","api"],"backgroundTag":"upstream-resource-not-found","analyzedSha":"766fd8bc89a90b8534dc573ab72dec30215ab1ec","analyzedAt":"2026-08-30T01:40:27.499Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}