fix: safely reconcile rejected runtime creates (#47)
This commit is contained in:
+732
-199
File diff suppressed because it is too large
Load Diff
+5
-4
@@ -12,7 +12,8 @@ export function apiMessage(error) {
|
||||
}
|
||||
|
||||
export function conflictMessage(error, fallback) {
|
||||
if (error?.status === 409) return `冲突(409):${fallback}`;
|
||||
if (error?.status === 409)
|
||||
return `冲突(409):${error?.body?.error || fallback}`;
|
||||
if (error?.status === 503) return `环境不可用(503):${error.message}`;
|
||||
return apiMessage(error);
|
||||
}
|
||||
@@ -328,9 +329,9 @@ export function Select({
|
||||
(value === "" ? null : { value, label: value });
|
||||
const label = selected ? selected.label : placeholder;
|
||||
const items =
|
||||
emptyOption !== undefined
|
||||
? [{ value: emptyOption.value, label: emptyOption.label }, ...options]
|
||||
: options;
|
||||
emptyOption === undefined
|
||||
? options
|
||||
: [{ value: emptyOption.value, label: emptyOption.label }, ...options];
|
||||
const close = () => {
|
||||
setOpen(false);
|
||||
setActive(-1);
|
||||
|
||||
Reference in New Issue
Block a user