Handle errors from string input.