Resource picker unclear error messages

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.

1 Like

Hey @flavio-b - thanks for flagging as always! Happy to take a look on our end since it looks like the picker is failing inside the App Bridge host after selection.

If you have it handy, could you share the App Bridge version/CDN path, the app scopes, the staff user’s product permissions, and a rough timestamp/shop where this reproduced? A screen recording or console/network error would also help, but not needed if it’s too hard to grab - thanks!

Hi Alan, thank you. Can you send me a DM? I have a video and will send you the details.