fix(event): add optional errorcode field to event