Handle AA config failure (#9660)

* Clarify some comments

* Add error state in case of config failure

* Add retry button and relayout to accommodate
This commit is contained in:
Eric Bailey
2026-01-08 14:35:43 -06:00
committed by GitHub
parent d82592f072
commit a1857d62bd
9 changed files with 111 additions and 28 deletions
+9 -2
View File
@@ -30,12 +30,19 @@ export function useAgeAssuranceState(): AgeAssuranceState {
access: AgeAssuranceAccess.Safe,
}
// should never happen, but need to guard
/**
* This can happen if the prefetch fails (such as due to network issues).
* The query handler will try it again, but if it continues to fail, of
* course we won't have config.
*
* In this case, fail open to avoid blocking users.
*/
if (!config) {
logger.warn('useAgeAssuranceState: missing config')
return {
status: AgeAssuranceStatus.Unknown,
access: AgeAssuranceAccess.Unknown,
access: AgeAssuranceAccess.Safe,
error: 'config',
}
}