Ivago: invalid parameters also return 404 #11

Open
opened 2021-04-04 15:25:48 +02:00 by Jef Roosens · 2 comments

When visiting the following URL:

https://fej.roosens.me/ivago?street=Lange+Violettestraat+(GENT)&number=170&start_date=2021-04-04&end_date=2021-04-255

Instead of responding with a Bad Request error, it returns the default 404 handler.

Update:

The problem is now that we don't really have a way to detect wether a route failed because it doesn't exist or because its parameters weren't correct.

When visiting the following URL: `https://fej.roosens.me/ivago?street=Lange+Violettestraat+(GENT)&number=170&start_date=2021-04-04&end_date=2021-04-255` Instead of responding with a Bad Request error, it returns the default 404 handler. Update: The problem is now that we don't really have a way to detect wether a route failed because it doesn't exist or because its parameters weren't correct.
Jef Roosens added this to the Version 1.0: Ivago milestone 2021-04-04 15:25:48 +02:00
Jef Roosens added the
bug
label 2021-04-04 15:25:48 +02:00
Jef Roosens self-assigned this 2021-04-04 15:25:48 +02:00
Jef Roosens added this to the (deleted) project 2021-04-04 15:25:48 +02:00

I just realized this is expected behavior. The real problem here is the fact that the error system isn't specific enough at the moment, so any typo in a parameter results in a 404, instead of a meaningful message.

I just realized this is expected behavior. The real problem here is the fact that the error system isn't specific enough at the moment, so any typo in a parameter results in a 404, instead of a meaningful message.
Jef Roosens changed title from Ivago: invalid parameter errors aren't handled properly to Ivago: invalid parameter also return 404 2021-04-04 19:11:40 +02:00
Jef Roosens removed this from the Version 1.0: Ivago milestone 2021-04-04 19:12:19 +02:00
Jef Roosens removed this from the (deleted) project 2021-04-04 19:12:22 +02:00
Jef Roosens changed title from Ivago: invalid parameter also return 404 to Ivago: invalid parameters also return 404 2021-04-05 10:06:11 +02:00

I think we can use a fairing to check the error type on response.

I think we can use a fairing to check the error type on response.
Jef Roosens added this to the Fej 1.2.0 - Curse of the Forge milestone 2021-04-15 10:26:23 +02:00
Jef Roosens added this to the Fej 1.2 - Curse of the Forge project 2021-04-15 10:27:55 +02:00
Jef Roosens added the
project/backend
label 2021-04-29 09:29:18 +02:00
Jef Roosens added a new dependency 2021-05-10 16:56:52 +02:00
Jef Roosens modified the milestone from Fej 1.2.0 - Curse of the Forge to Fej 1.1.0 - The Calm before the Storm 2021-05-10 16:57:09 +02:00
Jef Roosens modified the project from Fej 1.2 - Curse of the Forge to Fej 1.1.0 2021-05-10 16:57:15 +02:00
Sign in to join this conversation.
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Depends on
Reference: Chewing_Bever/fej#11
There is no content yet.