File tree 1 file changed +8
-3
lines changed 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -199,7 +199,7 @@ async function setupApp() {
199
199
get_opening_command ().then (handleCommand)
200
200
checkUpdates ()
201
201
fetchCredentials ()
202
- processPendingSurveys ()
202
+ await processPendingSurveys ()
203
203
}
204
204
205
205
const stateFailed = ref (false )
@@ -409,7 +409,12 @@ async function processPendingSurveys() {
409
409
isWithinLastTwoWeeks (instance .last_played ) && ! isWithinLastTwoWeeks (instance .created ),
410
410
) >= 0
411
411
412
- const surveys = await $fetch (' https://api.modrinth.com/v2/surveys' )
412
+ let surveys = []
413
+ try {
414
+ surveys = await $fetch (' https://api.modrinth.com/v2/surveys' )
415
+ } catch (e) {
416
+ console .error (' Error fetching surveys:' , e)
417
+ }
413
418
414
419
const surveyToShow = surveys .find (
415
420
(survey ) =>
@@ -431,7 +436,7 @@ async function processPendingSurveys() {
431
436
},
432
437
onOpen : () => console .info (' Opened user survey' ),
433
438
onClose : () => console .info (' Closed user survey' ),
434
- onSubmit : () => console .info (' Active user submitted' ),
439
+ onSubmit : () => console .info (' Active user survey submitted' ),
435
440
}
436
441
437
442
try {
You can’t perform that action at this time.
0 commit comments