fix: upgrade console.warn to console.error for caught errors in useDependencies and useMissions#4212
Conversation
✅ Deploy Preview for kubestellarconsole ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
👋 Hey @Copilot — thanks for opening this PR!
This is an automated message. |
…Dependencies and useMissions Signed-off-by: GitHub Copilot <copilot@github.com> Agent-Logs-Url: https://github.com/kubestellar/console/sessions/3e99b379-026f-4b82-b910-b20bd0fa00b6 Co-authored-by: clubanderson <407614+clubanderson@users.noreply.github.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Thanks for your pull request. Before we can look at it, you'll need to add a 'DCO signoff' to your commits. 📝 Please follow instructions in the contributing guide to update your commits with the DCO Full details of the Developer Certificate of Origin can be found at developercertificate.org. The list of commits missing DCO signoff:
DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
There was a problem hiding this comment.
Pull request overview
Updates hook-level error logging severity so caught failures are emitted as console.error (instead of console.warn), improving visibility in production error monitoring while preserving existing fallback behavior.
Changes:
- Upgraded REST → agent fallback failure logging in
useResolveDependencies()fromconsole.warntoconsole.error. - Upgraded WebSocket reconnection failure logging in
MissionProviderfromconsole.warntoconsole.error.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| web/src/hooks/useDependencies.ts | Promotes REST/agent dependency-resolution catch-block logs to console.error for better operational visibility. |
| web/src/hooks/useMissions.tsx | Promotes WebSocket reconnection failure catch-block log to console.error to surface reconnection errors more clearly. |
|
Thank you for your contribution! Your PR has been merged. Check out what's new:
Stay connected: Slack #kubestellar-dev | Multi-Cluster Survey |
Auto-QA flagged three catch blocks using
console.warnfor genuine error conditions — wrong severity, invisible to production error monitoring.📌 Fixes
📝 Summary of Changes
Three
console.warncalls in catch blocks upgraded toconsole.error:useDependencies.ts: REST API failure fallback and agent resolve-deps failureuseMissions.tsx: WebSocket reconnection failure in.catch()handlerNote:
useDependenciesalready surfaces the final error to the UI viasetError()— these log lines are intermediate diagnostic signals that deserve the correct severity.Changes Made
console.warn→console.errorin REST API failure catch (useDependencies.ts:151)console.warn→console.errorin agent failure catch (useDependencies.ts:164)console.warn→console.errorin WebSocket reconnection failure catch (useMissions.tsx:590)Checklist
git commit -s)Screenshots or Logs (if applicable)
N/A — console output change only.
👀 Reviewer Notes
Purely a log-severity fix. No logic changes. Pre-existing
react-hooks/exhaustive-depswarnings inuseMissions.tsxare unrelated and pre-date this PR.