call the error method when something bad happens #334