In the recent past, we used to be able to do catch Resource Picker errors and alert the user if they don’t have product permissions, for example:
try {
const something = await shopify.resourcePicker({type: 'product', ...other});
} catch (error) {
// Alert merchant they might need product permissions.
}
Now, if the merchant has no product permission, the picker opens just fine, allows the merchant to view all products and even select them, but when they click “Select” it displays simply “Server error”. It also prevents all interactions in the frame, effectively freezing the entire app.
We can’t catch this error to show a more descriptive message, probably because the error is thrown in a different context, outside the iframe. This creates a lot of confusion for merchants and support tickets for something that could be solved with a clearer message.
I believe that these errors should be thrown in the app’s context so we can catch them like before.
