Skip to content

Commit

Permalink
Merge pull request #407 from MAhsenArif/update-server-error-message
Browse files Browse the repository at this point in the history
[MNOE-534]: Added redirection for 500 server error
  • Loading branch information
ouranos authored Jan 10, 2018
2 parents 2162fab + 039592c commit d99c8c3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/app/index.config.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ angular.module 'mnoEnterpriseAngular'
)
return $q.defer().promise

# Redirect to an error page when there is a bug at backend
when 500
$log.info('[MnoHubErrorInterceptor] MnoHub server error, redirecting to error page')
$window.location.href = "/mnoe/errors/#{rejection.status}"
return $q.defer().promise

else
$q.reject rejection
}
Expand Down

0 comments on commit d99c8c3

Please sign in to comment.