-
Notifications
You must be signed in to change notification settings - Fork 18
Milestone
Description
The whole instance page blows up when an instance is marked failed with an unset auto restart policy. The error is thrown by this ts-pattern match call, which blows up to tell you you have an unhandled case.
console/app/components/InstanceAutoRestartPopover.tsx
Lines 65 to 73 in f097ec9
| {match(policy) | |
| .with('never', () => ( | |
| <Badge color="neutral" variant="solid"> | |
| never | |
| </Badge> | |
| )) | |
| .with('best_effort', () => <Badge>best effort</Badge>) | |
| .with(undefined, () => <Badge color="neutral">Default</Badge>) | |
| .exhaustive()} |
Strictly speaking this is only a manifestation of the real bug in the TS client generator, which does not generate | null on types that can in fact be null. This means that in the console we do not handle the possibility of null adequately.
console/app/api/__generated__/Api.ts
Line 1927 in f097ec9
| autoRestartPolicy?: InstanceAutoRestartPolicy |
Metadata
Metadata
Assignees
Labels
No labels