Skip to content

Commit

Permalink
Merge pull request #44 from rwth-iat/http_api/remove_nonfunctional_no…
Browse files Browse the repository at this point in the history
…t_implemented_check

adapter.http: remove nonfunctional 'Not Implemented' check
  • Loading branch information
Frosty2500 authored Jun 20, 2024
2 parents f57a640 + 00e87b6 commit b826036
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions basyx/aas/adapter/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -695,9 +695,10 @@ 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.")
return endpoint(request, values, map_adapter=map_adapter)
# 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]

# any raised error that leaves this function will cause a 500 internal server error
# so catch raised http exceptions and return them
except werkzeug.exceptions.NotAcceptable as e:
Expand Down

0 comments on commit b826036

Please sign in to comment.