diff --git a/src/routes/+error.svelte b/src/routes/+error.svelte
index 3f311d1..705d615 100644
--- a/src/routes/+error.svelte
+++ b/src/routes/+error.svelte
@@ -8,6 +8,7 @@
{#if page.status == 20}
+

{:else}

diff --git a/src/routes/trains/+page.ts b/src/routes/trains/+page.ts
index a48ff0d..95c67d1 100644
--- a/src/routes/trains/+page.ts
+++ b/src/routes/trains/+page.ts
@@ -23,7 +23,7 @@ export const load: PageLoad = async ({ url }) => {
const response = await OwlClient.trains.getByHeadcode(headcode, date, toc);
// Shouldn't be needed to cast the type...
- const results = (response.data || []);
+ const results = (response.data);
return {
title: headcode.toUpperCase(),
results: results,
@@ -35,7 +35,8 @@ export const load: PageLoad = async ({ url }) => {
owlCode: 'VALIDATION_ERROR',
});
} else if (e instanceof ApiError) {
- console.log(e);
+ // Check if NO_RESULTS error, and return empty array if that is the case
+ // Maybe adjust the resulting error depending on the ERROR Code?!
throw error(20, {
message: e.message,
owlCode: 'API_ERROR',