mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-04-15 03:01:37 -05:00
Fixed handing test suite
no issue - The response from the server might not always contain an array with errors (for example when there's a generic 503 error). This changes prevents tests from hanging and adds at least some relevant output
This commit is contained in:
parent
307e4c2643
commit
af8387d1f4
1 changed files with 1 additions and 1 deletions
|
@ -105,7 +105,7 @@ const login = (request, API_URL) => {
|
|||
}));
|
||||
} else if (res.statusCode !== 200 && res.statusCode !== 201) {
|
||||
return reject(new errors.InternalServerError({
|
||||
message: res.body.errors[0].message
|
||||
message: _.get(res, 'body.errors[0].message') || res.error.message
|
||||
}));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue