mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
fix: catch rejected promise if it is in a try-catch block
This commit is contained in:
parent
25603cf136
commit
8f5d4ae8a0
5 changed files with 6 additions and 6 deletions
|
|
@ -95,7 +95,7 @@ const uploadToSignedUrl = async (
|
|||
responseType: 'stream',
|
||||
timeout: REQUEST_TIMEOUT,
|
||||
})
|
||||
return axios.put(uploadSignedUrl, stream.data, {
|
||||
return await axios.put(uploadSignedUrl, stream.data, {
|
||||
headers: {
|
||||
'Content-Type': contentType,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ export const setLabels = async (
|
|||
})
|
||||
|
||||
try {
|
||||
return axios.post(`${apiEndpoint}/graphql`, data, {
|
||||
return await axios.post(`${apiEndpoint}/graphql`, data, {
|
||||
headers: {
|
||||
Cookie: `auth=${auth};`,
|
||||
'Content-Type': 'application/json',
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ export const sendNotification = async (
|
|||
}
|
||||
|
||||
try {
|
||||
return axios.post(`${apiEndpoint}/notification/send`, requestData, {
|
||||
return await axios.post(`${apiEndpoint}/notification/send`, requestData, {
|
||||
headers: {
|
||||
Cookie: `auth=${auth};`,
|
||||
'Content-Type': 'application/json',
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ export const archivePage = async (
|
|||
})
|
||||
|
||||
try {
|
||||
return axios.post(`${apiEndpoint}/graphql`, data, {
|
||||
return await axios.post(`${apiEndpoint}/graphql`, data, {
|
||||
headers: {
|
||||
Cookie: `auth=${auth};`,
|
||||
'Content-Type': 'application/json',
|
||||
|
|
@ -66,7 +66,7 @@ export const markPageAsRead = async (
|
|||
})
|
||||
|
||||
try {
|
||||
return axios.post(`${apiEndpoint}/graphql`, data, {
|
||||
return await axios.post(`${apiEndpoint}/graphql`, data, {
|
||||
headers: {
|
||||
Cookie: `auth=${auth};`,
|
||||
'Content-Type': 'application/json',
|
||||
|
|
|
|||
Loading…
Reference in a new issue