From 8e66b2cdcd5a227895fd9ed6f38ba935a22f128f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leon=20M=C3=B6ller?= Date: Wed, 19 Jun 2024 17:27:03 +0200 Subject: [PATCH] adapter.http: remove nonfunctional 'Not Implemented' check This check was intended to return 501 instead of 404 for routes that haven't been implemented. However, we explicitly implement these routes to return 501 now anyway, returning 501 for all other paths would be semantically incorrect anyway and the check never worked. --- basyx/aas/adapter/http.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/basyx/aas/adapter/http.py b/basyx/aas/adapter/http.py index 77a4c1b4b..0d16f81e0 100644 --- a/basyx/aas/adapter/http.py +++ b/basyx/aas/adapter/http.py @@ -699,8 +699,6 @@ def handle_request(self, request: Request): map_adapter: MapAdapter = self.url_map.bind_to_environ(request.environ) try: endpoint, values = map_adapter.match() - if endpoint is None: - raise werkzeug.exceptions.NotImplemented("This route is not yet implemented.") # TODO: remove this 'type: ignore' comment once the werkzeug type annotations have been fixed # https://github.com/pallets/werkzeug/issues/2836 return endpoint(request, values, map_adapter=map_adapter) # type: ignore[operator]