badges/shields · info · NotFound
not specified
Error message
not specified
What it means
The AUR license badge reads the License field of the first result. If the package has no license metadata in the AUR (field missing, null, or an empty array), transform throws NotFound with 'not specified' so the badge shows that the license is unspecified upstream, distinguishing it from a network or schema failure.
Source
Thrown at services/aur/aur.service.js:78
static openApi = {
'/aur/license/{packageName}': {
get: {
summary: 'AUR License',
description: 'Arch linux User Repository License',
parameters: pathParams({
name: 'packageName',
example: 'android-studio',
}),
},
},
}
static defaultBadgeData = { label: 'license' }
transform(json) {
const licenses = json.results[0].License
if (!licenses || licenses.length === 0) {
throw new NotFound({ prettyMessage: 'not specified' })
}
return { licenses }
}
async handle({ packageName }) {
const json = await this.fetch({ packageName })
const { licenses } = this.transform(json)
return renderLicenseBadge({ licenses, color: 'blue' })
}
}
class AurVotes extends BaseAurService {
static category = 'rating'
static route = { base: 'aur/votes', pattern: ':packageName' }
static openApi = {View on GitHub (pinned to 766fd8bc89)
Solutions
- Check the package's AUR page and add or fix the license field in the PKGBUILD if you maintain it.
- If you are the consumer and the license truly is unspecified, accept the 'not specified' badge as the correct output.
- Fall back to the upstream repository's license badge if the AUR metadata is incomplete.
Example fix
// before (PKGBUILD)
# license not declared
// after (PKGBUILD)
license=('MIT') Defensive patterns
Strategy: fallback
Validate before calling
const data = await fetchAurInfo(pkg)
const licenses = data.results?.[0]?.License
if (!licenses || licenses.length === 0) console.warn(`No license metadata for ${pkg}`) Type guard
function hasLicense(r) {
return Array.isArray(r?.License) && r.License.length > 0
} Try / catch
try {
return await getAurLicense(pkg)
} catch (e) {
if (/not specified/.test(e.message)) return 'license unspecified'
throw e
} Prevention
- Always declare license in AUR PKGBUILDs you maintain
- Cross-check the upstream repo license when AUR metadata is empty
- Treat 'not specified' as data, not a failure, when rendering
When it happens
Trigger: Calling the AUR license badge for a package whose AUR metadata has no License entry: json.results[0].License is undefined or an empty array, so transform throws NotFound({ prettyMessage: 'not specified' }).
Common situations: AUR packages created without a license field in the PKGBUILD; packages where the maintainer never filled in license metadata even though the software has a license; very old or abandoned AUR packages.
Understand the failure class
Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.
Related errors
AI-assisted analysis of badges/shields@766fd8bc89 (2026-08-30).
Data as JSON: /api/errors/355da0cd31ddab17.
Report an issue: GitHub.