Commit 6a8e69c5 authored by Evren Kutar's avatar Evren Kutar

catch connection errors

parent 3f92ca0a
...@@ -210,8 +210,8 @@ module.exports = function (grunt) { ...@@ -210,8 +210,8 @@ module.exports = function (grunt) {
}, },
watch: { watch: {
dev: { dev: {
files: ['app/**/*.js', 'app/components/**/*.html', 'app/main.html', 'Gruntfile.js', '!app/tmp/*.js', '!app/app.js'], files: ['app/**/*.js', 'app/**/**/*.js', 'app/components/**/*.html', 'app/main.html', 'Gruntfile.js', '!app/tmp/*.js', '!app/app.js'],
tasks: ['env:dev', 'preprocess:dev', 'html2js:dev'], tasks: ['env:dev', 'preprocess:dev', 'html2js:dev', 'default', 'watch:dev'],
options: { options: {
atBegin: false atBegin: false
} }
......
...@@ -85,6 +85,11 @@ app.config(['$httpProvider', function ($httpProvider) { ...@@ -85,6 +85,11 @@ app.config(['$httpProvider', function ($httpProvider) {
'</div>').modal(); '</div>').modal();
}; };
if (rejection.status === -1) {
rejection.data = {title: "error", description : 'connection failed'};
errorModal();
}
if (rejection.status === 400) { if (rejection.status === 400) {
$location.reload(); $location.reload();
} }
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment