Adjust error page & the error handling of the trains load function. Intead of throwing error on no-results, an empty array is passed to the page. A 'no-results' component will roughly echo the error pages not-found.

This commit is contained in:
2026-04-28 18:13:05 +01:00
parent 16d929fad1
commit 68af07b9bd
4 changed files with 24 additions and 15 deletions

View File

@@ -7,10 +7,11 @@
</script>
<div class="error-wrapper">
{#if page.status == 20}
<!-- Check the values passed in the ApiError object and decide what to present -->
{#if page.status == 404}
<!-- Warning no data image -->
<img class="err-img" src={noResult} alt="" role="presentation" width="200" height="200" />
{:else}
<!-- STOP Error image -->
<img class="err-img" src={stopErr} alt="" role="presentation" width="150" height="210" />
{/if}
<h2 class="label">{page.status}</h2>