Add functionality for handling error inputs