Skip to content

Commit

Permalink
Always display error details
Browse files Browse the repository at this point in the history
Before this we'd hide error details behind a `<details>` element, but
all error messages I've seen so far were very short, meaning they'd fit
perfectly well on the page.

These changes always show the error message, which makes error pages
more consistent and avoid styling issues re. the more dynamic page.
  • Loading branch information
nmattia committed Sep 30, 2022
1 parent 771a485 commit a8be96a
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/frontend/src/components/displayError.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,13 @@ const pageContent = (options: ErrorOptions) => html`
${warnBox({
title: options.title,
message: options.message,
htmlElement: "div",
slot:
options.detail !== undefined
? html`<details class="displayErrorDetail">
<summary class="c-summary">
<span class="c-summary__link t-link">Error details</span>
</summary>
<pre class="t-paragraph">${options.detail}</pre>
</details>`
? html`<div class="l-divider"></div>
<h4>Error details:</h4>
<pre class="t-paragraph">${options.detail}</pre>`
: undefined,
htmlElement: "div",
})}
<div class="l-stack">
Expand Down

0 comments on commit a8be96a

Please sign in to comment.