Pass more webview logs to the tauri backend#810
Merged
t-aleksander merged 2 commits intomainfrom Mar 18, 2026
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR centralizes error formatting via a new errorDetail() helper and upgrades many catch blocks to log richer diagnostics through Tauri’s backend logger (instead of console.error), plus adds global forwarding for uncaught errors/unhandled rejections.
Changes:
- Add
src/shared/utils/errorDetail.tsand adopt it across the app for consistent error logging. - Replace various
console.error/JSON.stringify(e)logging with@tauri-apps/plugin-log+errorDetail(...). - Add global handlers in
src/main.tsxfor uncaught errors and unhandled promise rejections; update Biome schema URL.
Reviewed changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/shared/utils/errorDetail.ts | New helper to extract a useful debug string from unknown thrown values. |
| src/shared/hooks/useClipboard.ts | Logs clipboard write failures via Tauri logger + errorDetail. |
| src/shared/components/providers/DeepLinkProvider.tsx | Improves deep-link error logging with consistent formatting. |
| src/pages/enrollment/steps/SendFinishStep/SendFinishStep.tsx | Adds structured backend logging for enrollment finish errors. |
| src/pages/enrollment/steps/MfaSetupStep/MfaSetupStep.tsx | Removes console.error and relies on backend logging. |
| src/pages/enrollment/steps/DeviceStep/components/DesktopSetup/DesktopSetup.tsx | Logs enrollment device creation errors with more context. |
| src/pages/client/pages/ClientSettingsPage/components/GlobalLogs/GlobalLogs.tsx | Uses errorDetail when log export fails. |
| src/pages/client/pages/ClientInstancePage/modals/UpdateInstanceModal/components/UpdateInstanceModalForm.tsx | Adds network error handling + more detailed backend logs for enrollment/update flows. |
| src/pages/client/pages/ClientInstancePage/modals/DeleteInstanceModal/DeleteInstanceModal.tsx | Logs delete failures to backend with instance context. |
| src/pages/client/pages/ClientInstancePage/components/LocationsList/modals/MFAModal/MFAModal.tsx | Improves MFA error logs; adds network failure detail handling. |
| src/pages/client/pages/ClientInstancePage/components/LocationsList/modals/MFAModal/components/MfaMobileApprove/MfaMobileApprove.tsx | Logs MFA mobile approval failures with errorDetail. |
| src/pages/client/pages/ClientInstancePage/components/LocationsList/components/LocationCardRoute/LocationCardRoute.tsx | Improves routing toggle error logging. |
| src/pages/client/pages/ClientInstancePage/components/LocationsList/components/LocationCardConnectButton/LocationCardConnectButton.tsx | Improves connect/disconnect error logging. |
| src/pages/client/pages/ClientEditTunnelPage/modals/DeleteTunnelModal/DeleteTunnelModal.tsx | Logs tunnel deletion errors via backend logger. |
| src/pages/client/pages/ClientEditTunnelPage/components/EditTunnelFormCard.tsx | Logs tunnel update failures with errorDetail. |
| src/pages/client/pages/ClientAddInstancePage/components/AddInstanceFormCard/components/AddInstanceInitForm/AddInstanceInitForm.tsx | Adds more detailed logs and error handling in add-instance initialization flow. |
| src/pages/client/pages/ClientAddInstancePage/components/AddInstanceFormCard/components/AddInstanceDeviceForm/AddInstanceDeviceForm.tsx | Adds backend logging for device config save/submit failures. |
| src/main.tsx | Forwards uncaught errors and unhandled rejections to Tauri backend log. |
| src/components/AutoProvisioningManager.tsx | Improves auto-provisioning error logging while avoiding logging full config. |
| src/components/ApplicationUpdateManager/ApplicationUpdateManager.tsx | Improves version-check failure logging with context. |
| biome.json | Updates Biome schema reference URL. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
...cePage/components/AddInstanceFormCard/components/AddInstanceInitForm/AddInstanceInitForm.tsx
Show resolved
Hide resolved
j-chmielewski
approved these changes
Mar 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.