Skip to content

Commit

Permalink
added error inter
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrurodr committed Mar 4, 2022
1 parent 461dcd4 commit e1b491e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ function wrapWebhook(webhook: string, payload: Object): Promise<void> {
client.interceptors.response.use((axiosResponse: AxiosResponse) => {
logInfo(JSON.stringify(axiosResponse))
return axiosResponse
}, (error: AxiosError) => {
logInfo(JSON.stringify(error))
return error
})
await client.post(webhook, payload)
} catch(e: any) {
Expand Down

0 comments on commit e1b491e

Please sign in to comment.