handle two types of errors