Fixing the route to send the correct status codes back