From 83f6c3b4f4a47484724e8f9d377171f482ab082b Mon Sep 17 00:00:00 2001 From: Andrew L Date: Sat, 4 Nov 2023 20:02:27 +0000 Subject: [PATCH] Replaces 500 error with 404 when no schedules found --- uk-rail-schedule-api.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uk-rail-schedule-api.go b/uk-rail-schedule-api.go index 36cbcee..8efb9a2 100644 --- a/uk-rail-schedule-api.go +++ b/uk-rail-schedule-api.go @@ -675,5 +675,5 @@ func dbGetSchedules(identifierType string, identifier string, date string, toc s return schedules, nil } - return nil, errors.New("no schedule found") + return nil, nil }