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')
|
@transitionTo('login')
|
||||||
|
|
||||||
actions:
|
actions:
|
||||||
error: (error) ->
|
error: (error, maybeTransition) ->
|
||||||
return unless @connections?.length # cannot use outlet at this moment
|
return unless @connections?.length # cannot use outlet at this moment
|
||||||
console.log error
|
console.log error
|
||||||
container = Ember.getOwner(@)
|
container = Ember.getOwner(@)
|
||||||
@@ -33,6 +33,11 @@ export default Ember.Mixin.create ApplicationRouteMixin,
|
|||||||
@set 'router.globals.current_user', null
|
@set 'router.globals.current_user', null
|
||||||
@transitionTo 'login'
|
@transitionTo 'login'
|
||||||
return
|
return
|
||||||
|
#when 404
|
||||||
|
# # nothing for now apparently
|
||||||
|
# #maybeTransition?.abort?()
|
||||||
|
# #@transitionTo 'four-oh-four'
|
||||||
|
# #return
|
||||||
controller = container.lookup "component:error-handling"
|
controller = container.lookup "component:error-handling"
|
||||||
return unless controller?.set
|
return unless controller?.set
|
||||||
controller.set 'error', error
|
controller.set 'error', error
|
||||||
|
|||||||
Reference in New Issue
Block a user