catch exception on invalid qrcode