name RouteNotFoundError

This commit is contained in:
Party Wumpus
2024-03-01 23:08:32 +00:00
parent 11b743a792
commit de9d2144a6
+1 -2
View File
@@ -116,8 +116,7 @@ class WSRouter:
self.logger.debug(f'Started PY call {data["route"]} ID {data["id"]}')
create_task(self._call_route(data["route"], data["args"], data["id"]))
else:
error = {"error":"Route " + data["route"] + " does not exist.", "name": "NameMeOrNoneIDK", "traceback": None}
# Dunno why but fstring doesnt work here
error = {"error":f'Route {data["route"]} does not exist.', "name": "RouteNotFoundError", "traceback": None}
create_task(self.write({"type": MessageType.ERROR.value, "id": data["id"], "message": error}))
case _:
self.logger.error("Unknown message type", data)