-
Notifications
You must be signed in to change notification settings - Fork 164
feat(BA-817): Better error log during server context initialization #3796
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: octodog <[email protected]>
try: | ||
await root_ctx.event_producer.ping() | ||
except (Exception, asyncio.CancelledError) as e: | ||
log.error("Failed to initiate event producer (error: {0})", repr(e)) | ||
raise |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Umm… Rather than inserting log.error
in every place where an Exception might occur, it seems better to convey exceptions meaningfully and handle them in a common place.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which place should the error handler be? I want the logger logs the exception raised in bootstrap steps
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The direction of subsequent work should be towards applying it to the common structure, but this PR will apply it as a temporary measure for now.
Is it still in the draft state and not yet completed? @fregataa
…ging' into feat/better-server-init-fail-logging
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand the issue, but I'm not sure if this is the way to implement it.
resolves #3788 (BA-817)
Checklist: (if applicable)