badges/shields · error · NotFound

resource not found

Error message

resource not found

What it means

The VoxelShop latest-version badge handle() throws a plain NotFound when the API response has no resource object, surfacing the default 'resource not found' message. Like the downloads badge, this means VoxelShop did not return a resource for the requested id, so no latest version can be read from response.resource.updates.latest.version.

Source

Thrown at services/voxelshop/voxelshop-latest-version.service.js:34

      get: {
        summary: 'Voxel Shop Version',
        description,
        parameters: pathParams({
          name: 'resourceId',
          example: '323',
        }),
      },
    },
  }

  static defaultBadgeData = {
    label: 'voxel.shop',
  }

  async handle({ resourceId }) {
    const { response } = await this.fetch({ resourceId })
    if (!response.resource) {
      throw new NotFound()
    }
    return renderVersionBadge({
      version: response.resource.updates.latest.version,
    })
  }
}

View on GitHub (pinned to 766fd8bc89)

Solutions

  1. Confirm the resourceId matches an existing public resource on voxel.shop.
  2. Fix a mistyped id using the id in the resource page URL.
  3. Remove the badge or pick a different resource if the original was deleted.

Example fix

// before
/badge/voxelshop/latest-version/88888
// after
/badge/voxelshop/latest-version/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 hasLatestVersion = (r) => typeof r?.resource?.updates?.latest?.version === 'string'

Try / catch

try { renderVersionBadge() } catch (e) { if (e instanceof NotFound) return 'resource unavailable'; throw e }

Prevention

When it happens

Trigger: Fetching the voxelshop latest-version badge with a resourceId whose API response contains no resource key — deleted, nonexistent, or inaccessible resource.

Common situations: Asset deleted on voxel.shop; mistyped resource id; resource made private after the badge was embedded.

Related errors


AI-assisted analysis of badges/shields@766fd8bc89 (2026-08-30). Data as JSON: /api/errors/e09c6bf3f2a8fc5c. Report an issue: GitHub.