error controller#770
Merged
Merged
Conversation
KetanReddy
reviewed
Dec 10, 2025
KetanReddy
reviewed
Dec 10, 2025
KetanReddy
reviewed
Dec 10, 2025
KetanReddy
reviewed
Dec 10, 2025
cehan-Chloe
commented
Dec 11, 2025
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## player-1-dot-zero #770 +/- ##
========================================
========================================
☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Bundle ReportChanges will increase total bundle size by 247.66kB (5.45%) ⬆️
ℹ️ *Bundle size includes cached data from a previous commit Affected Assets, Files, and Routes:view changes for bundle: plugins/markdown/coreAssets Changed:
view changes for bundle: plugins/reference-assets/coreAssets Changed:
view changes for bundle: plugins/external-action/coreAssets Changed:
view changes for bundle: core/playerAssets Changed:
view changes for bundle: plugins/metrics/coreAssets Changed:
view changes for bundle: plugins/beacon/coreAssets Changed:
view changes for bundle: plugins/async-node/coreAssets Changed:
view changes for bundle: plugins/check-path/coreAssets Changed:
view changes for bundle: react/subscribeAssets Changed:
view changes for bundle: react/playerAssets Changed:
|
KetanReddy
reviewed
Dec 16, 2025
KetanReddy
reviewed
Dec 16, 2025
fa8b5d3 to
07bcf2a
Compare
d361939 to
19a65b6
Compare
* error controller navigation
* Error controller expose to iOS/Android
* add asset error recovery via asyncNodePlugin on web and android * fix test errors * fix async test * comment last broken test for now * finish ios implementation of error recovery * add errors with metadata to error controller on react and android * re-enable react player test. fail player state from error controller if no transition available. * update ResolverStage to be an enum * fix android build errors * finish ios error recovery implementation * format kt and add ts tests * fix mock package build * fix throwable serializer. Improve react state management during errors * remove throwing asset. fix error severity in jvm * revert delete of one jvm test. use local data model in error middleware. fix ios tests * revert change to player config. fix swift errorcontroller tests * fix swiftlint error * Update core/player/src/controllers/error/utils/isErrorWithMetadata.ts Co-authored-by: Ketan Reddy <KetanReddy@users.noreply.github.com> * Update plugins/async-node/core/src/utils/getNodeFromError.ts Co-authored-by: Ketan Reddy <KetanReddy@users.noreply.github.com> * Update core/player/src/controllers/error/utils/__tests__/isErrorWithMetadata.test.ts Co-authored-by: Ketan Reddy <KetanReddy@users.noreply.github.com> * make resolvererror public in player core * update reference asset plugin tests * update error middleware to export binding prefix * add tests for useSubscriber hook * fix eslint error * update testing for async node plugin. fix issue with recursive search of async nodes on error * add react player tests for error handling * add error tests for resolver changes * fix test and lint errors * update lockfile * add additional throwable serializer tests for new functionality * replace hasErrorTransition function with getErrorTransitionState reused across the flow instance and error controller * update error docs for async node plugin * format kt files to fix lint issues * ignore jvm testutils in codecov report * separate JSError class in kt and code cleanup * fix hermes ThrowablSserializerTest * fix type name in heremes ThrowableSerializerTest * make JSErrorException constructor internal. use mapserializer in throwableserializer * update JSValueError to serialize to and deserialize from JS objects * code cleanup on JSValueError * start replacing PlayerError type with real error * fix j2v8 toInvokable. match error serialization to core changes on swift/kotlin * kt lint format and fix swiftuiplayer test compile * update const string enums in ios. clean up logging in error controller core * fix test errors * remove hasMetadata from ErrorWithMetadata. make JSKeys an enum with string constants * cleanup kotlin implementation * change enum namespaces for constants to structs * remove encodable from HookWithResult generic --------- Co-authored-by: Ketan Reddy <KetanReddy@users.noreply.github.com>
KVSRoyal
approved these changes
Apr 24, 2026
tmarmer
approved these changes
Apr 27, 2026
JunDangIntuit
approved these changes
Apr 27, 2026
sugarmanz
approved these changes
Apr 30, 2026
spentacular
reviewed
May 5, 2026
| ); | ||
|
|
||
| // Reset mock to track only clearErrors call | ||
| vitest.clearAllMocks(); |
Member
There was a problem hiding this comment.
Can we make this more specific instead of the root vitest for all of these?
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.
Define error controller types and hooks
Change Type (required)
Indicate the type of change your pull request is:
patchminormajorN/ADoes your PR have any documentation updates?
Release Notes
Error Controller
Player now has a built-in ErrorController, instantiated automatically when a flow starts and accessible via controllers.error on all platforms.
Core API
captureError(error) accepts any error implementing the PlayerErrorMetadata interface (type, optional severity, optional metadata). It fires the onError bail hook, writes to errorState in the data model, and navigates via errorTransitions. Returns true if the error was handled (hook bailed or an errorTransitions route was navigated), false if the flow was failed.
onError is a bail hook — returning true takes ownership of the error, preventing errorState from being written and navigation from occurring. Additional state inspection methods: getCurrentError(), getErrors(), clearErrors(), clearCurrentError().
Error Navigation
Flows can define errorTransitions at the node or flow level to route errors to dedicated error views instead of failing the flow:
{ "errorTransitions": { "render": "RENDER_ERROR_VIEW", "*": "GENERIC_ERROR_VIEW" } }
Node-level takes precedence over flow-level. The "*" wildcard matches any unhandled type.
Render-Time Error Capture
Capture asset render errors. Each platform provides an AssetRenderError / AssetRenderException with the failing asset id and full parent path in the error message