Adding error to callback