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

90% Statements 36/40
50% Branches 7/14
100% Functions 1/1
89.47% Lines 17/19

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      5x 388x     388x 5x   5x 5x 388x     388x 393x   393x 388x 393x   388x 393x   5x 5x       5x  
<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)="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>