We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 99582f1 commit 70c5b95Copy full SHA for 70c5b95
1 file changed
functions/lib/pubsub/webhook-tiny.js
@@ -56,6 +56,20 @@ module.exports = async (
56
if (!err && isDone) {
57
return resolve(true)
58
}
59
+ if (err?.config?.url) {
60
+ const { method, url } = err.config
61
+ logger.warn(`${method} ${url} failed`, {
62
+ data: err.config.data,
63
+ response: err.response?.data,
64
+ status: err.response?.status
65
+ })
66
+ if (err.response?.status === 503) {
67
+ setTimeout(() => {
68
+ throw err
69
+ }, 1000)
70
+ return
71
+ }
72
73
throw err
74
75
@@ -99,6 +113,12 @@ module.exports = async (
99
113
response: err.response?.data,
100
114
status: err.response?.status
101
115
})
116
117
118
119
120
121
102
122
103
123
104
124
0 commit comments