Hi Andrew,
Thanks for your reply.
Unfortunately, knowing how to avoid the exception does not help me, because I need to install the snippet.
I also don't know what demo means, since the documentation only has these:
===========
Specifies how the theme is being used within the shop. Valid values are:
main: the theme customers see when visiting the shop in a desktop browser.
mobile: the theme customers see when visiting the shop in a mobile browser.
unpublished: the theme that customers cannot currently see.
============
Hopefully a shopify employee will find out for us and let us know.
Thanks
Amit