resolveErrorPresentation function
Resolves how an error should be presented.
Shared by handleAuthError and handleWebAppError so both follow the same
contract: a disposed widget short-circuits to ErrorPresentation.none; an
integrator callback takes precedence over default navigation.
Implementation
ErrorPresentation resolveErrorPresentation({
required bool isMounted,
required bool hasCallback,
}) {
if (!isMounted) return ErrorPresentation.none;
return hasCallback
? ErrorPresentation.invokeCallback
: ErrorPresentation.navigateToFallback;
}