@@ -15,7 +15,7 @@ import {
15
15
} from '@lifinance/types'
16
16
import { getProvider } from '../../utils/getProvider'
17
17
import { switchChain } from '../switchChain'
18
- import { LifiErrorCodes , ServerError } from '../../utils/errors'
18
+ import { ServerError } from '../../utils/errors'
19
19
20
20
export class BridgeExecutionManager {
21
21
shouldContinue = true
@@ -158,7 +158,7 @@ export class BridgeExecutionManager {
158
158
} catch ( e : any ) {
159
159
statusManager . updateProcess ( step , waitForTxProcess . id , 'FAILED' , {
160
160
errorMessage : 'Failed waiting' ,
161
- errorCode : e . code ,
161
+ errorCode : e ? .code ,
162
162
} )
163
163
statusManager . updateExecution ( step , 'FAILED' )
164
164
throw e
@@ -201,18 +201,15 @@ export class BridgeExecutionManager {
201
201
txHash
202
202
)
203
203
} catch ( e : any ) {
204
- // until the source transaction is mined the API will return a 404, which is not really an error
205
- if ( e . code !== LifiErrorCodes . notFound ) {
206
- console . debug ( 'Fetching status from backend failed' , e )
207
- }
208
-
204
+ console . debug ( 'Fetching status from backend failed' , e )
209
205
return resolve ( undefined )
210
206
}
211
207
212
208
switch ( statusResponse . status ) {
213
209
case 'DONE' :
214
210
return resolve ( statusResponse )
215
211
case 'PENDING' :
212
+ case 'NOT_FOUND' :
216
213
return resolve ( undefined )
217
214
case 'FAILED' :
218
215
default :
0 commit comments