From b07a24b992aaeb8062e52e32f72f4f70a1e38d98 Mon Sep 17 00:00:00 2001 From: Chris Thielen Date: Sun, 12 Feb 2017 13:45:11 -0600 Subject: [PATCH] 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. --- src/state/stateService.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/state/stateService.ts b/src/state/stateService.ts index fd261b21..613e174d 100644 --- a/src/state/stateService.ts +++ b/src/state/stateService.ts @@ -365,7 +365,7 @@ export class StateService { if (error.type === RejectType.ABORTED) { router.urlRouter.update(); - // Fall through to default error handler + return services.$q.reject(error); } }