Skip to content

Commit

Permalink
Log no websocket connection as error, not debug
Browse files Browse the repository at this point in the history
In a scenario with misconfigured firewall, this debug log message was not taken
seriously when it actually exposed a real error. Thus, elevate this to the ERROR
log level.

The only two usages of ClientConnectionError in client.py are situations which
should yield an ERROR on the log
  • Loading branch information
berland committed Sep 20, 2023
1 parent c1ab4e6 commit 1a4d3f4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/_ert_job_runner/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ async def _send(self, msg: AnyStr) -> None:
_error_msg = (
f"Not able to establish the "
f"websocket connection {self.url}! Max retries reached!"
" Check for firewall issues."
f" Exception from {type(exception)}: {str(exception)}"
)
raise ClientConnectionError(_error_msg) from exception
Expand Down
2 changes: 1 addition & 1 deletion src/_ert_job_runner/reporting/event.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def _event_publisher(self):
event = None
except ClientConnectionError as exception:
# Possible intermittent failure, we retry sending the event
logger.debug(str(exception))
logger.error(str(exception))
pass
except ClientConnectionClosedOK as exception:
# The receiving end has closed the connection, we stop
Expand Down

0 comments on commit 1a4d3f4

Please sign in to comment.