fix: catch rejected promise if it is in a try-catch block

This commit is contained in:
Hongbo Wu
2024-01-23 18:45:46 +08:00
parent 25603cf136
commit 8f5d4ae8a0
5 changed files with 6 additions and 6 deletions

View File

@ -112,7 +112,7 @@ const createHttpTaskWithToken = async ({
}
try {
return client.createTask({ parent, task })
return await client.createTask({ parent, task })
} catch (error) {
logError(error)
return null