Fix error message

This commit is contained in:
Ildar Kamalov 2019-02-19 11:05:30 +03:00
parent 2b0addd505
commit ff012cf0a3
1 changed files with 1 additions and 1 deletions

View File

@ -19,7 +19,7 @@ export default class Api {
if (error.response) { if (error.response) {
throw new Error(`${errorPath} | ${error.response.data} | ${error.response.status}`); throw new Error(`${errorPath} | ${error.response.data} | ${error.response.status}`);
} }
throw new Error(`${errorPath} | ${error}`); throw new Error(`${errorPath} | ${error.message ? error.message : error}`);
} }
} }