handling of erlang error responses