badges/shields · warning · InvalidResponse
no public receiving stats
Error message
no public receiving stats
What it means
The Liberapay receiving badge throws InvalidResponse when the API response lacks public receiving statistics (`data.receiving` absent or incomplete). Mirrors the giving badge: Liberapay lets users hide receiving amounts, and without them the 'receives' badge cannot render. This is an expected data-availability failure, not a network error.
Source
Thrown at services/liberapay/liberapay-receives.service.js:28
summary: 'Liberapay receiving',
parameters: pathParams({
name: 'entity',
example: 'Changaco',
}),
},
},
}
async handle({ entity }) {
const data = await this.fetch({ entity })
if (data.receiving) {
return renderCurrencyBadge({
label: 'receives',
amount: data.receiving.amount,
currency: data.receiving.currency,
})
} else {
throw new InvalidResponse({ prettyMessage: 'no public receiving stats' })
}
}
}
View on GitHub (pinned to 766fd8bc89)
Solutions
- Disable the 'hide receiving amounts' privacy setting in the Liberapay profile (Privacy tab) if it is your account.
- For other users' private profiles, switch to the goal badge or remove the receives badge.
- Double-check the entity/username spelling in the badge URL.
Defensive patterns
Strategy: try-catch
Validate before calling
const res = await fetch(`https://liberapay.com/${entity}/public.json`);
const data = await res.json();
const receivesPublicly = Boolean(data.receiving && data.receiving.amount != null);
if (!receivesPublicly) console.warn(`${entity} does not publish receiving stats`); Type guard
function hasPublicReceiving(data) {
return Boolean(data?.receiving && typeof data.receiving.amount === 'number' && typeof data.receiving.currency === 'string');
} Try / catch
try {
badge = await getLiberapayReceivesBadge(entity);
} catch (e) {
if (e.name === 'InvalidResponse') {
badge = renderBadge('receives', 'hidden');
} else throw e;
} Prevention
- Disable the receiving-amount privacy setting on the Liberapay account
- Handle hidden profiles gracefully with an 'hidden' placeholder
- Double-check the entity/username spelling before generating the badge
When it happens
Trigger: Requesting /liberapay/receives/<entity> where the fetched profile JSON has no usable `receiving` object — receiving amounts are private or zero/hidden.
Common situations: User enabled receiving-amount privacy on Liberapay; account with no patrons so receiving stats are hidden; misspelled entity name resolving to a different profile without public receiving data.
Related errors
- no public giving stats
- private
- no public goals
- no versions found
- invalid response data from auth endpoint
AI-assisted analysis of badges/shields@766fd8bc89 (2026-08-30).
Data as JSON: /api/errors/de7cc1390286e442.
Report an issue: GitHub.