error handling for decryption