diegosouzapw/OmniRoute · error · Error

description

Error message

description

What it means

Thrown by the activity feed's fetchEntries when the high-activity audit request (level=high, limit=FEED_LIMIT) returns a non-OK response; the UI text is taken from the response's error description, so a bare 'description' means the server sent no usable error text.

Solutions

  1. Check the audit-log API route for failures and confirm the dashboard session is authenticated
  2. Return a structured, human-readable error message from the route so the feed shows meaningful text
  3. Inspect server logs for the failing audit query
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at src/app/(dashboard)/dashboard/activity/ActivityFeedClient.tsx:29 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of diegosouzapw/OmniRoute@a179ffed5b (2026-08-25). Data as JSON: /api/errors/c910275095b97a41. Report an issue: GitHub.

Appendix: source

Thrown at src/app/(dashboard)/dashboard/activity/ActivityFeedClient.tsx:29

export default function ActivityFeedClient() {
  const t = useTranslations("activity");
  const [allEntries, setAllEntries] = useState<AuditLogEntry[]>([]);
  const [loading, setLoading] = useState(true);
  const [error, setError] = useState<string | null>(null);
  const [category, setCategory] = useState<EventCategory>("all");
  const referenceNowMs = useRef<number>(Date.now());

  const fetchEntries = useCallback(async () => {
    setLoading(true);
    setError(null);
    try {
      const params = new URLSearchParams({
        level: "high",
        limit: String(FEED_LIMIT),
      });
      const res = await fetch(`/api/compliance/audit-log?${params.toString()}`);
      if (!res.ok) {
        throw new Error(t("description"));
      }
      const data = (await res.json()) as AuditLogEntry[];
      // Reset reference time on fresh load so relative timestamps are stable
      referenceNowMs.current = Date.now();
      setAllEntries(Array.isArray(data) ? data : []);
    } catch (err: unknown) {
      const msg = err instanceof Error ? err.message : t("fetchFailed");
      setError(msg);
    } finally {
      setLoading(false);
    }
  }, [t]);

  useEffect(() => {
    fetchEntries();
  }, [fetchEntries]);

  const filtered =

View on GitHub (pinned to a179ffed5b)