bstein-dev-home/frontend/src/account/accountErrors.js
2026-05-21 16:23:59 -03:00

10 lines
377 B
JavaScript

export function formatActionError(err, fallback) {
const message = err?.message || "";
if (!message) return fallback;
const normalized = message.toLowerCase();
if (normalized.includes("ariadne unavailable") || normalized.includes("status 502") || normalized.includes("status 503")) {
return "Ariadne is busy. Please try again in a moment.";
}
return message;
}