added another example for error method