added testing for Error