mirror of
https://github.com/pockethost/pockethost.git
synced 2025-07-01 18:32:31 +00:00
chore: rework error messaging on container fail
This commit is contained in:
parent
752b0bcf78
commit
197b2f5370
@ -301,19 +301,17 @@ export const instanceService = mkSingleton(
|
|||||||
return cp
|
return cp
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
warn(`Error spawning: ${e}`)
|
warn(`Error spawning: ${e}`)
|
||||||
|
userInstanceLogger.error(`Error spawning: ${e}`)
|
||||||
if (UPGRADE_MODE()) {
|
if (UPGRADE_MODE()) {
|
||||||
throw new Error(
|
// Noop
|
||||||
`PocketHost is rebooting. Try again in a few seconds.`,
|
|
||||||
)
|
|
||||||
} else {
|
} else {
|
||||||
await updateInstance(instance.id, {
|
await updateInstance(instance.id, {
|
||||||
maintenance: true,
|
maintenance: true,
|
||||||
})
|
})
|
||||||
userInstanceLogger.error(
|
|
||||||
`Could not launch container. Instance has been placed in maintenance mode. Please review your instance logs at https://app.pockethost.io/app/instances/${instance.id} or contact support at https://pockethost.io/support`,
|
|
||||||
)
|
|
||||||
throw new Error(`Maintenance mode`)
|
|
||||||
}
|
}
|
||||||
|
throw new Error(
|
||||||
|
`Could not launch container. Instance has been placed in maintenance mode. Please review your instance logs at https://app.pockethost.io/app/instances/${instance.id} or contact support at https://pockethost.io/support`,
|
||||||
|
)
|
||||||
}
|
}
|
||||||
})()
|
})()
|
||||||
const { pid: _pid, exitCode } = childProcess
|
const { pid: _pid, exitCode } = childProcess
|
||||||
|
Loading…
x
Reference in New Issue
Block a user