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}\`
8787 event . data . payload ,
8888 ) ;
8989 } else {
90- throw new Error ( response . error ) ;
90+ throw new Error ( `Discord returned status code ${ response . status } ` ) ;
9191 }
9292 // [END v2SendToDiscord]
9393 } catch ( error ) {
@@ -129,7 +129,7 @@ UDID **${testerDeviceIdentifier}** for ${testerDeviceModelName}
129129 `Posted iOS device registration alert for ${ testerEmail } to Discord` ,
130130 ) ;
131131 } else {
132- throw new Error ( response . error ) ;
132+ throw new Error ( `Discord returned status code ${ response . status } ` ) ;
133133 }
134134 // [END v2SendNewTesterIosDeviceToDiscord]
135135 } catch ( error ) {
@@ -190,7 +190,7 @@ exports.postperformancealerttodiscord = onThresholdAlertPublished(
190190 event . data . payload ,
191191 ) ;
192192 } else {
193- throw new Error ( response . error ) ;
193+ throw new Error ( `Discord returned status code ${ response . status } ` ) ;
194194 }
195195 // [END v2SendPerformanceAlertToDiscord]
196196 } catch ( error ) {
Original file line number Diff line number Diff line change @@ -83,7 +83,6 @@ exports.backupapod = onTaskDispatched(
8383 const picUrl = apod . hdurl ;
8484 logger . info ( `Fetched ${ picUrl } from NASA API for date ${ date } .` ) ;
8585
86- const picResp = await fetch ( picUrl ) ;
8786 const picResp = await fetch ( picUrl ) ;
8887 const imageBuffer = await picResp . arrayBuffer ( ) ;
8988 const buffer = Buffer . from ( imageBuffer ) ;
You can’t perform that action at this time.
0 commit comments