Almost 404 handling, but failt on application load, therefore current error fallback is better thant the handling of it
This commit is contained in:
@@ -23,7 +23,7 @@ export default Ember.Mixin.create ApplicationRouteMixin,
|
||||
@transitionTo('login')
|
||||
|
||||
actions:
|
||||
error: (error) ->
|
||||
error: (error, maybeTransition) ->
|
||||
return unless @connections?.length # cannot use outlet at this moment
|
||||
console.log error
|
||||
container = Ember.getOwner(@)
|
||||
@@ -33,6 +33,11 @@ export default Ember.Mixin.create ApplicationRouteMixin,
|
||||
@set 'router.globals.current_user', null
|
||||
@transitionTo 'login'
|
||||
return
|
||||
#when 404
|
||||
# # nothing for now apparently
|
||||
# #maybeTransition?.abort?()
|
||||
# #@transitionTo 'four-oh-four'
|
||||
# #return
|
||||
controller = container.lookup "component:error-handling"
|
||||
return unless controller?.set
|
||||
controller.set 'error', error
|
||||
|
||||
Reference in New Issue
Block a user