Mercurial > libervia-backend
diff sat/plugins/plugin_comp_ap_gateway/__init__.py @ 4014:4ef473116499
component AP gateway (http): handle properly NotFound error:
When an `exceptions.NotFound` is received, log a warning message and return the
appropriate HTTP code instead of raising the default `exceptions.InternalError`.
author | Goffi <goffi@goffi.org> |
---|---|
date | Sat, 18 Mar 2023 16:53:21 +0100 |
parents | b13673d998dc |
children | 4a2c261646b6 |
line wrap: on
line diff
--- a/sat/plugins/plugin_comp_ap_gateway/__init__.py Sat Mar 18 16:20:30 2023 +0100 +++ b/sat/plugins/plugin_comp_ap_gateway/__init__.py Sat Mar 18 16:53:21 2023 +0100 @@ -474,7 +474,7 @@ try: found_item = found_items[0] except IndexError: - raise exceptions.NotFound("requested items can't be found") + raise exceptions.NotFound(f"requested item at {url} can't be found") if node.startswith(self._events.namespace): # this is an event