Transform connection errors to events