mirror of
https://github.com/pockethost/pockethost.git
synced 2025-05-11 18:29:54 +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
|
||||
} catch (e) {
|
||||
warn(`Error spawning: ${e}`)
|
||||
userInstanceLogger.error(`Error spawning: ${e}`)
|
||||
if (UPGRADE_MODE()) {
|
||||
throw new Error(
|
||||
`PocketHost is rebooting. Try again in a few seconds.`,
|
||||
)
|
||||
// Noop
|
||||
} else {
|
||||
await updateInstance(instance.id, {
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user