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.

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.

No worries - I’ve DMed you @flavio-b :slight_smile:

@Alan_G We experienced a similar issue. Could you please help us check this?
https://community.shopify.dev/t/resource-picker-apolloerror/28757/7?u=gordon_kihn

Hey @Gordon_Kihn - thanks for flagging this and for linking the related thread.

From the earlier reports, this does look like it’s failing after selection inside the App Bridge/resource picker host rather than from your app’s own await shopify.resourcePicker(...) call. The one difference here is that your case sounds product-specific, while the other thread was mostly permission/error-message related.

Could you share a fresh repro timestamp in UTC, the shop/myshopify domain, the App Bridge CDN path/version you’re using, and ideally the Network response/request ID from the failed picker confirm action?

The product and variant GIDs for the selected item would also help. With those details we can trace the backend request instead of guessing from the generic “Server error” message. Let me know if you’d rather share that info via DM and I can set that up.