OnError defines the structure of error handler used by the components in the ui kit
typedef OnError = Function(Exception e);