Error wrapper to fix mozilla/openbadges-backpack#1040 /cc @jdotpz @simonwex @toolness