Error handling improvements#457
Closed
mykhailodanilenko wants to merge 2 commits intoOwnTube-tv:mainfrom
Closed
Conversation
…iagnostics; enhance error capturing with detailed diagnostics data.
Contributor
There was a problem hiding this comment.
Pull Request Overview
Improves error handling, diagnostics, and session/token refresh logic, adds customizable error page button styling, and introduces diagnostic test behavior when rapidly copying device info.
- Adds richer error propagation (including collection/query errors) and PostHog diagnostic payloads.
- Refactors auth/session refresh logic and introduces 401 response handling plus safer cleanup in diagnostics hooks.
- Adds localized strings and UI tweaks (custom button text color, diagnostic copy stress test).
Reviewed Changes
Copilot reviewed 25 out of 25 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| screens/Playlists/index.tsx | Passes collection error object into error UI fallback. |
| screens/Playlists/components/PlaylistVideosView.tsx | Avoids suppressing error state when data empty. |
| screens/Playlist/index.tsx | Propagates playlist video load error to VideoGrid. |
| screens/ChannelsScreen/index.tsx | Consolidates error handling and defers to top-level ErrorPage. |
| screens/ChannelCategoryScreen/index.tsx | Adds combined video/category error propagation. |
| screens/CategoryScreen/index.tsx | Adds error state passthrough to VideoGrid. |
| screens/CategoriesScreen/index.tsx | Includes collection error in error resolution logic. |
| public/featured-instances.json5 | Enables username/password login for an instance. |
| locales/*.json | Adds new i18n keys for copy feedback and stress test error. |
| hooks/useAuthSessionSync.tsx | Async session selection with loaded-state guard. |
| hooks/useAppStateDiagnostics.ts | Safeguards optional subscription cleanup. |
| diagnostics/useCustomDiagnosticEvents.ts | Removes unsafe any cast when capturing events. |
| components/shared/Button.tsx | Adds optional textColor override and adjusts text color logic. |
| components/ErrorPage.tsx | Supports custom button styling/colors. |
| components/ErrorBoundary.tsx | Supplies explicit button styling/colors. |
| components/DeviceCapabilities/DeviceCapabilities.tsx | Adds copy feedback, press limit test throwing an error, refactors UI. |
| components/ChannelView.tsx | Avoids hiding component on error state. |
| components/CategoryView.tsx | Adds variant prop and avoids early return on error. |
| app/_layout.tsx | Repositions ErrorBoundary higher in component tree. |
| api/helpers.ts | Adds collection error aggregation and Axios error parsing utility. |
| api/errorHandler.ts | Adds structured diagnostics for HTTP errors. |
| api/axiosInstance.ts | Refines token refresh logic and adds 401 response interceptor. |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
OwnTube.tv/components/DeviceCapabilities/DeviceCapabilities.tsx
Outdated
Show resolved
Hide resolved
4b693bd to
8c076d7
Compare
Contributor
|
@claude Please review. |
|
Claude encountered an error —— View job I'll analyze this and get back to you. |
15 tasks
Contributor
|
Replaced by #459 |
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.
🚀 Description
This PR improves the error handling mechanisms and logging across the application, while fixing some of the errors related to refresh token handling. Also, a small test for error handling is added to the "copy diagnostic info" button, press it 5 times in a row and observe the result.
📄 Motivation and Context
#451
🧪 How Has This Been Tested?
📦 Types of changes
✅ Checklist (copied from README)
npx eslint .andnpx prettier --check ../from the./OwnTube.tv/directory (without errors/warnings)