mirror of
https://github.com/trycua/computer.git
synced 2026-01-04 20:40:15 -06:00
Changed _send_command logging
This commit is contained in:
@@ -789,11 +789,11 @@ class GenericComputerInterface(BaseComputerInterface):
|
||||
|
||||
# If REST failed with "Request failed", try WebSocket as fallback
|
||||
if not result.get("success", True) and (result.get("error") == "Request failed" or result.get("error") == "Server returned malformed response"):
|
||||
self.logger.debug(f"REST API failed for command '{command}', trying WebSocket fallback")
|
||||
self.logger.warning(f"REST API failed for command '{command}', trying WebSocket fallback")
|
||||
try:
|
||||
return await self._send_command_ws(command, params)
|
||||
except Exception as e:
|
||||
self.logger.debug(f"WebSocket fallback also failed: {e}")
|
||||
self.logger.error(f"WebSocket fallback also failed: {e}")
|
||||
# Return the original REST error
|
||||
return result
|
||||
|
||||
|
||||
Reference in New Issue
Block a user