handle error in base64 decoding