session: Fix logging of error types in callbacks