mirror of
https://github.com/stablyai/orca.git
synced 2026-11-19 04:23:57 +00:00
fix(cloud): billingBlockKind without a non-exhaustive switch
This commit is contained in:
@@ -157,15 +157,10 @@ export function isBillingFailure(failure: VmBuildFailure | null): boolean {
|
||||
export function billingBlockKind(
|
||||
failure: VmBuildFailure | null
|
||||
): 'plan' | 'hoursUsed' | 'spendCap' | 'payment' | null {
|
||||
switch (failure?.kind) {
|
||||
case 'plan':
|
||||
case 'hoursUsed':
|
||||
case 'spendCap':
|
||||
case 'payment':
|
||||
return failure.kind
|
||||
default:
|
||||
return null
|
||||
}
|
||||
const kind = failure?.kind
|
||||
return kind === 'plan' || kind === 'hoursUsed' || kind === 'spendCap' || kind === 'payment'
|
||||
? kind
|
||||
: null
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user