Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

fix: show human-friendly wait time in throttle error toasts (#69458)

Alex Liderb6c3a2eeaad8
diff --git a/frontend/src/initKea.ts b/frontend/src/initKea.ts
index 91ac34085ae0..f2bcfe35d918 100644
--- a/frontend/src/initKea.ts
+++ b/frontend/src/initKea.ts
@@ -120,6 +120,14 @@ export function initKea({
if (!errorMessage && error.status === 404) {
errorMessage = 'URL not found'
}
+ // Reword the default raw-seconds throttle detail via Retry-After; keep custom messages.
+ if (
+ error.status === 429 &&
+ typeof errorMessage === 'string' &&
+ errorMessage.startsWith('Request was throttled')
+ ) {
+ errorMessage = `Rate limit exceeded. Please try again ${error.formattedRetryAfter}.`
+ }
if (isTwoFactorError || isSensitiveActionError) {
errorMessage = null
}