All files / src/app/components/error error.component.html

88.88% Statements 40/45
50% Branches 7/14
50% Functions 1/2
90% Lines 18/20

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33      8x 504x     504x 8x   8x 8x 504x     504x 512x   512x 504x 512x   504x 512x   8x 8x 8x       8x  
<section class="hero">
  <div class="hero-body">
    <div class="grid">
      <div class="cell">
        @if (error.status !== 404) {
          <img class="illus" src="assets/svg/bug.svg" alt="bug">
        }
        @if (error.status === 404) {
          <img class="illus" src="assets/svg/moon.svg" alt="bug">
        }
      </div>
      <div class="cell">
        @if (error.status !== 404) {
          <h1 class="title">Server API error</h1>
        }
        @if (error.status === 404) {
          <h1 class="title">{{resourceName ? resourceName : 'Item'}} not found (404)</h1>
        }
        <p>Got an error when requesting {{error.url}}</p>
        @if (error.statusText) {
          <p>{{error.statusText}}</p>
        }
        @if (error.status) {
          <p>{{error.status}}</p>
        }
        <a (click)="reloadPage()" aria-hidden="true" class="button is-rounded cta">Reload</a>
        <a (click)="goBack()" aria-hidden="true" class="button is-rounded cta">Go Back</a>
        <a routerLink="/" class="button is-rounded cta">Go Home</a>
      </div>
    </div>
  </div>
</section>