File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -25,9 +25,9 @@ export const runPolling = async <Client, Input>(
25
25
input : Input ,
26
26
acceptorChecks : ( client : Client , input : Input ) => Promise < WaiterResult >
27
27
) : Promise < WaiterResult > => {
28
- const { state } = await acceptorChecks ( client , input ) ;
28
+ const { state, reason } = await acceptorChecks ( client , input ) ;
29
29
if ( state !== WaiterState . RETRY ) {
30
- return { state } ;
30
+ return { state, reason } ;
31
31
}
32
32
33
33
let currentAttempt = 1 ;
@@ -46,9 +46,9 @@ export const runPolling = async <Client, Input>(
46
46
return { state : WaiterState . TIMEOUT } ;
47
47
}
48
48
await sleep ( delay ) ;
49
- const { state } = await acceptorChecks ( client , input ) ;
49
+ const { state, reason } = await acceptorChecks ( client , input ) ;
50
50
if ( state !== WaiterState . RETRY ) {
51
- return { state } ;
51
+ return { state, reason } ;
52
52
}
53
53
54
54
currentAttempt += 1 ;
You can’t perform that action at this time.
0 commit comments