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
chore: Reduce RTS error log spam #31917
Conversation
WalkthroughWalkthroughThe update enhances error handling within a specific function by refining how errors are logged. It incorporates structured logging of error responses and ensures that general error causes are captured as strings. This adjustment aims to improve debugging efficiency by offering clearer insights into error origins and details. Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
} else if (error.response) { | ||
log.error( | ||
"Error response received while authentication: ", | ||
error.response, | ||
JSON.stringify(error.response.data), // this is so the message shows up in one line. | ||
); | ||
} else { | ||
log.error("Error authenticating", error); | ||
log.error("Error authenticating", error.cause?.toString()); | ||
} | ||
return false; | ||
} |
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.
📝 NOTE
This review was outside the diff hunks, and no overlapping diff hunk was found. Original lines [1-1]
Regarding the TODO comment about deriving API_BASE_URL
from the host header instead of using an environment variable: This is an important consideration for simplifying configuration. However, the note about Axios not working for HTTPS endpoints needs attention. It's crucial to address this limitation to ensure secure communication, especially for authentication purposes.
Would you like assistance in debugging the Axios issue with HTTPS endpoints or exploring alternative HTTP clients that support HTTPS?
We're logging the entire request/response, Axios config etc. in the logs, which isn't adding any value in troubleshooting, but is making reading logs much harder.
This PR will print only the essential information to logs, concisely.
Summary by CodeRabbit