error handling for an invalid transaction