🥅 Catch several JS/API related preview issues

This commit is contained in:
Philipp Stracker 2024-07-01 15:25:06 +02:00
parent 5307225ef3
commit 0197896500
No known key found for this signature in database
4 changed files with 61 additions and 5 deletions

View file

@ -42,7 +42,14 @@ class GooglePayPreviewButtonManager extends PreviewButtonManager {
return {};
}
return await apiMethod();
try {
return await apiMethod();
} catch (error) {
if (error.message.includes('Not Eligible')) {
this.apiError = 'Not Eligible';
}
return null;
}
}
/**