Identifying Error Types

Following the guides at Loading / Error Substates - Routing - Ember Guides , how can I identify the error type?

actions: {
    error(error, transition) {
      if (error) {
        return this.transitionTo('errorPage');

In the above code; which I have in my application route, ‘error’ returns a ‘0’ only. How can I identify the error types? Such as 401 etc.