noKeyHint method
The fallback hint when no key resolved (or the token was rejected). A degraded secure store (gh-1679 AC3) replaces the bare "no key set" with the store-health wording: an earlier paste may never have reached the durable store, which is exactly the incident's self-contradicting 401.
Implementation
String noKeyHint(
String? entryKey,
String baseUrl,
ProviderSpec? spec,
String scopedName,
List<String> names,
) {
final suggested =
entryKey ??
(baseUrl != spec?.defaultBaseUrl ? scopedName : names.first);
if (!explicitToken) {
final degraded = degradedStoreHint(suggested);
if (degraded != null) return degraded;
}
return explicitToken
? ' — the /provider token was rejected; set a fresh one with '
'/key set $suggested <value>'
: ' — no key set; store one with /key set $suggested <value>';
}