some more fixes

This commit is contained in:
Adina Parpalita
2019-10-22 16:54:02 +03:00
parent e8ed183a44
commit e8e353fd48
10 changed files with 42 additions and 27 deletions

View File

@@ -50,10 +50,18 @@ export abstract class RepoApi {
protected handleError(message: string, response: any) {
console.log(`\n--- ${message} error :`);
console.log('\t>>> Status: ', response.status);
console.log('\t>>> Text: ', response.response.text);
console.log('\t>>> Method: ', response.response.error.method);
console.log('\t>>> Path: ', response.response.error.path);
if ( response.status ) {
try {
console.log('\t>>> Status: ', response.status);
console.log('\t>>> Text: ', response.response.text);
console.log('\t>>> Method: ', response.response.error.method);
console.log('\t>>> Path: ', response.response.error.path);
} catch {
console.log('\t>>> ', response);
}
}
else console.log('\t>>> ', response);
}
}