more debug output
This commit is contained in:
parent
ba02ed8b0f
commit
03017dfa41
|
@ -86,7 +86,7 @@ app.controller('MailboxController', ["$scope", "$interval", "$http", "$log", fun
|
||||||
|
|
||||||
self.loadEmailsAsync = function (username) {
|
self.loadEmailsAsync = function (username) {
|
||||||
$log.debug("updating mails for ", username);
|
$log.debug("updating mails for ", username);
|
||||||
$http.get(backend_url, {params: {username: username, action: "get"}})
|
$http.get(backend_url, {params: {username: username}})
|
||||||
.then(function successCallback(response) {
|
.then(function successCallback(response) {
|
||||||
$log.debug("received mails for ", username);
|
$log.debug("received mails for ", username);
|
||||||
if (response.data.mails) {
|
if (response.data.mails) {
|
||||||
|
@ -95,11 +95,20 @@ app.controller('MailboxController', ["$scope", "$interval", "$http", "$log", fun
|
||||||
self.address = response.data.address;
|
self.address = response.data.address;
|
||||||
self.username = response.data.username;
|
self.username = response.data.username;
|
||||||
} else {
|
} else {
|
||||||
self.error = "There is a problem with fetching the JSON. (JSON_ERROR). Reponse: " + response.data;
|
self.error = {
|
||||||
|
title: "JSON_ERROR",
|
||||||
|
desc: "The JSON from the response can not be read.",
|
||||||
|
detail: response
|
||||||
|
};
|
||||||
|
$log.error(response);
|
||||||
}
|
}
|
||||||
}, function errorCallback(response) {
|
}, function errorCallback(response) {
|
||||||
$log.error(response);
|
$log.error(response, this);
|
||||||
self.error = "There is a problem with fetching the JSON. (HTTP_ERROR). Status: " + response.status;
|
self.error = {
|
||||||
|
title: "HTTP_ERROR",
|
||||||
|
desc: "There is a problem with loading the data. (HTTP_ERROR).",
|
||||||
|
detail: response
|
||||||
|
};
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -45,8 +45,12 @@
|
||||||
<div class="container min-height">
|
<div class="container min-height">
|
||||||
<div ng-if="$ctrl.error" class="alert alert-danger" role="alert">
|
<div ng-if="$ctrl.error" class="alert alert-danger" role="alert">
|
||||||
<p><strong>Sorry, there was a problem. </strong></p>
|
<p><strong>Sorry, there was a problem. </strong></p>
|
||||||
<p> {{$ctrl.error}} </p>
|
<p> {{$ctrl.error.desc}} </p>
|
||||||
<p> Make sure the backend works corrently using the developer tools of your web browser. </p>
|
<p>
|
||||||
|
<pre>{{$ctrl.error.detail|json}}</pre>
|
||||||
|
</p>
|
||||||
|
<p> If you are the developer you might want to check the developer tools console of your web
|
||||||
|
browser. </p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p ng-if="!$ctrl.username">
|
<p ng-if="!$ctrl.username">
|
||||||
|
|
Loading…
Reference in New Issue
Block a user