Skip to content

Enhance the error message to include error details.#798

Merged
jona159 merged 2 commits intodevfrom
feat/enhancedErrorMessage
Mar 4, 2026
Merged

Enhance the error message to include error details.#798
jona159 merged 2 commits intodevfrom
feat/enhancedErrorMessage

Conversation

@JerryVincent
Copy link
Collaborator

@JerryVincent JerryVincent commented Mar 4, 2026

Type of Change

  • Dependency upgrade
  • Bug fix (non-breaking change)
  • Breaking change
    • e.g. a fixed bug or new feature that may break something else
  • New feature
  • Code quality improvements
    • e.g. refactoring, documentation, tests, tooling, ...

Implementation

This PR enhances the ErrorMessage component to be context-aware and user-friendly. The component now uses useRouteError to capture actual error details and displays them with appropriate visual indicators, including error-specific icons, color-coded gradients, and status codes for different error types (404, 403, 500, network errors). Users see the actual error message (e.g., "Device not found", "Failed to load MQTT integration") instead of generic text, enabling them to understand and potentially resolve issues themselves. The updated UI includes actionable buttons (Go back, Go home, Try again) with the "Try again" option conditionally shown for server/network errors. Translations are also included.

Checklist

  • I gave this pull request a meaningful title
  • My pull request is targeting the dev branch
  • I have added documentation to my code
  • I have deleted code that I have commented out

Additional Information

@github-actions
Copy link

github-actions bot commented Mar 4, 2026

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 71.72% 1697 / 2366
🔵 Statements 70.02% 1773 / 2532
🔵 Functions 73.21% 339 / 463
🔵 Branches 58.79% 943 / 1604
File CoverageNo changed files found.
Generated in workflow #2127 for commit a078e76 by the Vitest Coverage Report Action

@jona159 jona159 merged commit 904fdb1 into dev Mar 4, 2026
12 of 14 checks passed
@jona159 jona159 deleted the feat/enhancedErrorMessage branch March 4, 2026 14:22
@JerryVincent JerryVincent restored the feat/enhancedErrorMessage branch March 4, 2026 23:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enhance the error message to let the user know what actually went wrong.

2 participants