Error log, retry notice, a waiting counter that keeps counting
- generation_errors: every failed attempt (model, attempt, outcome, duration); admin Hibanapló page and GET /v1/admin/errors; kept 90 days - The waiting page counts from when the text was asked for (requested_at), not from the page load, so a reload no longer restarts it - It says when an attempt failed and is retried, and when a failed text's unit was given back; admins see the error Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012vLHzh5qUhFtmJhzkcTbXL
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
/**
|
||||
* Shown while a text is being written again after a failed attempt: it is
|
||||
* retried on its own, nothing to do. Admins also see the error.
|
||||
*/
|
||||
export function RetryNotice({
|
||||
status,
|
||||
error,
|
||||
nextAttemptAt,
|
||||
isAdmin = false,
|
||||
}: {
|
||||
status: string;
|
||||
error?: string | null;
|
||||
nextAttemptAt?: string;
|
||||
isAdmin?: boolean;
|
||||
}) {
|
||||
if (!error || (status !== "pending" && status !== "running")) return null;
|
||||
const wait = nextAttemptAt ? Math.round((Date.parse(nextAttemptAt) - Date.now()) / 60_000) : 0;
|
||||
return (
|
||||
<div className="msg retry-notice" role="status">
|
||||
<p>
|
||||
Az előző próbálkozás nem sikerült, ezért automatikusan újrapróbáljuk. Nem kell újra kérned, és nem kerül
|
||||
többe.
|
||||
{status === "pending" && wait >= 1 ? ` A következő próbálkozás kb. ${wait} perc múlva indul.` : ""}
|
||||
</p>
|
||||
{isAdmin && <p className="hint">Hiba: {error}</p>}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user