close eventsource on error