fix: instance shutdown while in unhealthy state

This commit is contained in:
Ben Allfree 2023-06-19 03:55:26 +00:00
parent 6fb47aaf33
commit 7c23e507fc

View File

@ -145,7 +145,7 @@ export const instanceService = mkSingleton(
}
return startRequest()
},
shutdown: () => {
shutdown: async () => {
if (status !== InstanceApiStatus.Healthy) {
throw new Error(
`Attempt to shut down an instance request when instance is not in a healthy state.`