- Modified session callback to include error in the closure.