Pass error to callback