File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -80,4 +80,5 @@ export const REACT_COMPILED_FILES = [
8080 "apps/web/src/components/settings/useProjectScriptSettings.ts" ,
8181 "apps/web/src/components/settings/SnapShotSetupDialog.tsx" ,
8282 "apps/web/src/components/settings/NotificationSettings.tsx" ,
83+ "apps/web/src/components/settings/ProviderSetupSection.tsx" ,
8384] as const ;
Original file line number Diff line number Diff line change 11import {
22 isAtomCommandInterrupted ,
3+ settlePromise ,
34 squashAtomCommandFailure ,
45 type AtomCommandResult ,
56} from "@t3tools/client-runtime/state/runtime" ;
@@ -155,23 +156,22 @@ function ProviderSetupActions({
155156 pendingRef . current = true ;
156157 setPendingLabel ( label ) ;
157158 setError ( null ) ;
158- try {
159- const result = await request ( ) ;
160- if ( result . _tag === "Failure" ) {
161- if ( ! isAtomCommandInterrupted ( result ) ) {
162- const failure = squashAtomCommandFailure ( result ) ;
163- setError ( failure instanceof Error ? failure . message : "Provider setup failed." ) ;
164- }
165- return false ;
166- }
167- return true ;
168- } catch {
159+ const settled = await settlePromise ( request ) ;
160+ pendingRef . current = false ;
161+ setPendingLabel ( null ) ;
162+ if ( settled . _tag === "Failure" ) {
169163 setError ( "Provider setup failed. Try again." ) ;
170164 return false ;
171- } finally {
172- pendingRef . current = false ;
173- setPendingLabel ( null ) ;
174165 }
166+ const result = settled . value ;
167+ if ( result . _tag === "Failure" ) {
168+ if ( ! isAtomCommandInterrupted ( result ) ) {
169+ const failure = squashAtomCommandFailure ( result ) ;
170+ setError ( failure instanceof Error ? failure . message : "Provider setup failed." ) ;
171+ }
172+ return false ;
173+ }
174+ return true ;
175175 }
176176
177177 async function removeRuntime ( ) {
You can’t perform that action at this time.
0 commit comments