dont log on abort
This commit is contained in:
parent
c01ee1a8e0
commit
b21c24ae6e
1 changed files with 5 additions and 3 deletions
|
|
@ -472,12 +472,14 @@ export default class {
|
||||||
}, { abort: abortController.signal })
|
}, { abort: abortController.signal })
|
||||||
return new Promise((res, rej) => {
|
return new Promise((res, rej) => {
|
||||||
stream.responses.onError(error => {
|
stream.responses.onError(error => {
|
||||||
this.log(ERROR, "error with trackPaymentV2", error.message)
|
if (abortController.signal.aborted) {
|
||||||
rej(null)
|
this.log(ERROR, "error with trackPaymentV2", error.message)
|
||||||
|
rej(null)
|
||||||
|
}
|
||||||
})
|
})
|
||||||
stream.responses.onMessage(payment => {
|
stream.responses.onMessage(payment => {
|
||||||
abortController.abort()
|
|
||||||
res(payment)
|
res(payment)
|
||||||
|
abortController.abort()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue