Skip to content

Commit b07a24b

Browse files
feat(defaultErrorHandler): Do not invoke default error handler for ABORTED transitions
BREAKING CHANGE: ABORTED transitions do not invoke the `defaultErrorHandler` Returning `false` from a transition hook will abort the transition. - #### Old behavior Previously, this case was considered an error and was logged by `defaultErrorHandler`. After your feedback, we agree that this is not typically an error. - #### New behavior Now, aborted transitions do not trigger the `defaultErrorHandler` - #### Motivation: > Why introduce a BC? Most users do not consider ABORT to be an error. The default error handler should match this assumption. - #### BC liklihood > How likely am I to be affected? Low: Most users do not consider ABORT to be an error. For most users this will not be a BC. - #### BC severity > How severe is this BC? Low: Users who want to handle all transition rejections can register a `.onError` handler and filter/process accordingly.
1 parent bfa7520 commit b07a24b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/state/stateService.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ export class StateService {
365365

366366
if (error.type === RejectType.ABORTED) {
367367
router.urlRouter.update();
368-
// Fall through to default error handler
368+
return services.$q.reject(error);
369369
}
370370
}
371371

0 commit comments

Comments
 (0)