error handling

This commit is contained in:
Synox 2016-11-20 22:40:16 +01:00
parent 4fba2d5ae7
commit 93f4b3bc50
2 changed files with 10 additions and 2 deletions

View File

@ -94,7 +94,7 @@ app.controller('MailboxController', ["$scope", "$interval", "$http", "$log", fun
self.address = response.data.address;
self.username = response.data.username;
} else {
self.error = "There is a problem with fetching the JSON. (JSON_ERROR). Make sure the backend works corrently using the webbrowser developer tools. Reponse:" + response.data;
self.error = "There is a problem with fetching the JSON. (JSON_ERROR). Reponse:" + response.data;
}
}, function errorCallback(response) {
$log.error(response);

View File

@ -46,7 +46,15 @@
<div class="container min-height">
<div ng-if="$ctrl.error" class="alert alert-danger" role="alert">
Opps! {{$ctrl.error}}
<p>
<strong>Sorry, there was a problem. </strong>
</p>
<p>
{{$ctrl.error}}
</p>
<p>
Make sure the backend works corrently using the developer tools of your web browser.
</p>
</div>