Add model to track and send errors

need to check for the callback existence.