Files
anonymous_github/public/partials/admin/entityErrors.htm
T
Thomas DurieuxandClaude Opus 5.5 d3860f29ad fix(admin): group errors by code and service, list the routes that failed
- An issue is now one error code (or exception type) per service: one cause,
  such as a rate-limit burst, hits many routes. Rows show the most frequent
  route and "+N routes"; the issue page lists them with a count and a bar.
- The request header shows the viewer as a role ("Viewer: owner", "Viewer not
  signed in") beside the owner chip, with a user link only for another user.
- List meta parts no longer leave a lone separator when they wrap.
- The issue page shows the 10 latest occurrences and a "Show all" button
  instead of clipping the list.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 13:55:02 +00:00

26 lines
2.8 KiB
HTML

<section class="errs-entity" aria-labelledby="errs-entity-title" :aria-busy="entityErrors.loading ? 'true' : 'false'" v-if="entityErrors.key">
<div class="errs-entity-banner" role="status" v-if="entityFailingNow().length">
<span class="errs-now">Failing now</span>
<span>{{ errPlural(entityFailingNow().reduce((sum, issue) => sum + issue.count, 0), 'failure') }} in the last 24 h, the latest {{ errRelTime(entityFailingNow()[0].last) }}: <a :href="errIssueHref(entityFailingNow()[0].id)">{{ entityFailingNow()[0].title }}</a><template v-if="entityFailingNow().length &gt; 1"> and {{ entityFailingNow().length - 1 }} more</template>.</span>
</div>
<div class="errs-card-head"><h2 id="errs-entity-title">Errors <span class="errs-count" v-if="entityIssues().length">{{ entityIssues().length }}</span></h2></div>
<p class="errs-muted" role="status" v-if="entityErrors.loading">Loading errors…</p>
<p class="errs-muted" role="status" v-else-if="entityErrors.failed">Could not load errors. <button type="button" class="errs-link-button" @click="loadEntityErrors(true)">Retry</button></p>
<template v-else-if="entityErrors.data">
<ul class="errs-entity-list" v-if="entityIssues().length || entityExpected().length">
<li v-for="issue in entityIssues()" :key="issue.id">
<span class="errs-entity-main"><a :href="errIssueHref(issue.id)">{{ issue.title }}</a><span class="errs-muted"><code>{{ issue.code }}</code><template v-if="issue.route"> · {{ issue.method }} {{ issue.route }}<template v-if="issue.routeCount &gt; 1"> +{{ issue.routeCount - 1 }}</template></template><template v-else-if="issue.queue"> · job {{ issue.queue }}</template></span></span>
<span class="errs-entity-count">{{ errNumber(issue.count) }}</span>
<time :datetime="issue.last" :title="errDayTime(issue.last)">{{ issue.failingNow ? 'now' : errRelTime(issue.last) }}</time>
</li>
<li v-for="entry in entityExpected().slice(0, 5)" :key="'x' + entry.code + entry.status" class="is-expected">
<span class="errs-entity-main"><span><code>{{ entry.code }}</code> <span class="errs-tag">expected</span></span><span class="errs-muted">HTTP {{ entry.status || '—' }}</span></span>
<span class="errs-entity-count">{{ errNumber(entry.count) }}</span>
<time :datetime="entry.last">{{ errRelTime(entry.last) }}</time>
</li>
</ul>
<p class="errs-muted" v-else>No errors recorded in the last 24 h.</p>
<p class="errs-muted errs-entity-source">{{ entityErrors.data.source === 'central' ? 'From central logs' : 'From application history' }} · last 24 h · <a :href="'/admin/errors?q=' + (entityErrors.data.filters?.repoId ? 'repo:' + entityErrors.data.filters.repoId : 'user:' + (entityErrors.data.filters?.userId || ''))">Open in Errors</a></p>
</template>
</section>