File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed
alerts-to-discord/functions
taskqueues-backup-images/functions Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -87,7 +87,7 @@ id: \`${id}\`
87
87
event . data . payload ,
88
88
) ;
89
89
} else {
90
- throw new Error ( response . error ) ;
90
+ throw new Error ( `Discord returned status code ${ response . status } ` ) ;
91
91
}
92
92
// [END v2SendToDiscord]
93
93
} catch ( error ) {
@@ -129,7 +129,7 @@ UDID **${testerDeviceIdentifier}** for ${testerDeviceModelName}
129
129
`Posted iOS device registration alert for ${ testerEmail } to Discord` ,
130
130
) ;
131
131
} else {
132
- throw new Error ( response . error ) ;
132
+ throw new Error ( `Discord returned status code ${ response . status } ` ) ;
133
133
}
134
134
// [END v2SendNewTesterIosDeviceToDiscord]
135
135
} catch ( error ) {
@@ -190,7 +190,7 @@ exports.postperformancealerttodiscord = onThresholdAlertPublished(
190
190
event . data . payload ,
191
191
) ;
192
192
} else {
193
- throw new Error ( response . error ) ;
193
+ throw new Error ( `Discord returned status code ${ response . status } ` ) ;
194
194
}
195
195
// [END v2SendPerformanceAlertToDiscord]
196
196
} catch ( error ) {
Original file line number Diff line number Diff line change @@ -83,7 +83,6 @@ exports.backupapod = onTaskDispatched(
83
83
const picUrl = apod . hdurl ;
84
84
logger . info ( `Fetched ${ picUrl } from NASA API for date ${ date } .` ) ;
85
85
86
- const picResp = await fetch ( picUrl ) ;
87
86
const picResp = await fetch ( picUrl ) ;
88
87
const imageBuffer = await picResp . arrayBuffer ( ) ;
89
88
const buffer = Buffer . from ( imageBuffer ) ;
You can’t perform that action at this time.
0 commit comments