fixed httpclient error logging

This commit is contained in:
piratefinn 2018-03-20 16:53:14 +00:00
parent e7c718250f
commit 2eddb4dd9c
4 changed files with 6 additions and 34 deletions

View file

@ -247,8 +247,7 @@ export class AddDataComponent implements OnInit {
console.log(error);
try {
console.log(error.error);
const jsonError = error.json();
this.transactionFormStatusError = '"' + jsonError.error + '" Error, ' + jsonError.message;
this.transactionFormStatusError = '"' + error.error.error + '" Error, ' + error.error.message;
} catch (e) {
this.transactionFormStatusError = 'There was a server error, please try again later.';
}