catch error in events.json