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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user