createOrGetErrorEventHandler