mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
Added extra handling for test port conflict errors
- If you use ghost cli, you may have extra ghost instances running on 2369 - Add extra handling to make this case super clear next time it happens to someone (probably me)
This commit is contained in:
parent
814bb7da55
commit
27dd442059
1 changed files with 6 additions and 1 deletions
|
@ -98,7 +98,12 @@ const login = (request, API_URL) => {
|
|||
password: 'Sl1m3rson99'
|
||||
})
|
||||
.then(function then(res) {
|
||||
if (res.statusCode !== 200 && res.statusCode !== 201) {
|
||||
if (res.statusCode === 302) {
|
||||
// This can happen if you already have an instance running e.g. if you've been using Ghost CLI recently
|
||||
return reject(new common.errors.GhostError({
|
||||
message: 'Ghost is redirecting, do you have an instance already running on port 2369?'
|
||||
}));
|
||||
} else if (res.statusCode !== 200 && res.statusCode !== 201) {
|
||||
return reject(new common.errors.GhostError({
|
||||
message: res.body.errors[0].message
|
||||
}));
|
||||
|
|
Loading…
Add table
Reference in a new issue