match more specific error messages

Better error handling on more specific errors.