Skip to content

Class: JourneyError

@rxova/journey-core


@rxova/journey-core / JourneyError

Defined in: packages/core/src/core/errors.ts:51

Every error core throws itself.

Before this existed, distinguishing “duplicate plugin name” from “unknown step in transition” meant matching on the message text — which quietly made every message a compatibility promise. code is the stable contract; message is for humans and may be reworded in any release.

Errors surfaced through NavigationResult.error and the error subscription event stay unknown: those carry whatever the caller’s own work threw, which core cannot constrain.

  • Error
new JourneyError(
code,
message,
details?,
cause?
): JourneyError;

Defined in: packages/core/src/core/errors.ts:57

ParameterType
codeJourneyErrorCode
messagestring
detailsJourneyErrorDetails
cause?unknown

JourneyError

Error.constructor
PropertyModifierTypeInherited fromDefined in
cause?publicunknownError.causenode_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2022.error.d.ts:24
codereadonlyJourneyErrorCode-packages/core/src/core/errors.ts:52
eventreadonlystring | undefined-packages/core/src/core/errors.ts:54
messagepublicstringError.messagenode_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es5.d.ts:1075
namepublicstringError.namenode_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es5.d.ts:1074
pluginNamereadonlystring | undefined-packages/core/src/core/errors.ts:55
stack?publicstringError.stacknode_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es5.d.ts:1076
stepIdreadonlystring | undefined-packages/core/src/core/errors.ts:53