[FIX] Improve error processing for callbacks.