@salesforce/b2c-tooling-sdk / operations/mrt / RunMrtWithFallbackOptions
Interface: RunMrtWithFallbackOptions
Defined in: packages/b2c-tooling-sdk/src/operations/mrt/mrt-backend.ts:101
Options controlling runMrtWithFallback.
Properties
canFallbackToLegacy?
optionalcanFallbackToLegacy:boolean
Defined in: packages/b2c-tooling-sdk/src/operations/mrt/mrt-backend.ts:114
Whether a legacy fallback target actually exists (i.e. legacy credentials are configured). When auto would otherwise fall back but this is false, the original SCAPI error is rethrown instead of running the legacy branch — which would throw a misleading "provide an API key" error and bury the real SCAPI failure (e.g. a missing scope) that the user needs to fix. Defaults to true.
hasScapiConfig
hasScapiConfig:
boolean
Defined in: packages/b2c-tooling-sdk/src/operations/mrt/mrt-backend.ts:105
True iff a ScapiMrtConnection is available.
onFallback()?
optionalonFallback: (reason) =>void
Defined in: packages/b2c-tooling-sdk/src/operations/mrt/mrt-backend.ts:119
Invoked once when auto mode falls back from SCAPI to legacy, with the SCAPI rejection reason. Use to warn the user.
Parameters
reason
string
Returns
void
onResolve()?
optionalonResolve: (backend) =>void
Defined in: packages/b2c-tooling-sdk/src/operations/mrt/mrt-backend.ts:125
Invoked with the backend that will actually serve the call — before the SCAPI attempt, and again with 'legacy' if auto falls back. Use for -D/debug output.
Parameters
backend
Returns
void
preference
preference:
MrtBackendPreference
Defined in: packages/b2c-tooling-sdk/src/operations/mrt/mrt-backend.ts:103
Resolved user preference.