Return 400 for bad date argument

It’s more of a bad request, because the input is bad, rather than
something on our side being not found.
This commit is contained in:
Chris Hill-Scott
2020-05-13 08:56:54 +01:00
parent c61f7e70c2
commit cce153eee8
2 changed files with 2 additions and 2 deletions

View File

@@ -87,7 +87,7 @@ def get_uploaded_letter_by_service_and_print_day(service_id, letter_print_date):
try:
letter_print_datetime = datetime.strptime(letter_print_date, '%Y-%m-%d')
except ValueError:
abort(404)
abort(400)
pagination = dao_get_uploaded_letters_by_print_date(
service_id,
letter_print_date=letter_print_datetime,