Skip to content

SDK API Reference / mapComposableDispatchError

Function: mapComposableDispatchError() ​

mapComposableDispatchError(kind, error): unknown

The mapping withComposableDispatchErrors applies, as a plain function — for callers that already hold the error (a catch block that has other mappings to try first) rather than a thunk to wrap. Returns the error unchanged when it is not one of the two enablement shapes.

Hedged, on the same terms as the 404 arm of withComposableDispatchErrors: the sole caller is a composable journey create, where a missing parent folder and a genuine server fault produce the identical 404/500 with nothing in the body to separate them. So this states enablement as the likely cause and CREATE_OTHER_CAUSES_HELP names the other two, rather than asserting one.

Parameters ​

kind ​

AudienceKind

error ​

unknown

Returns ​

unknown