<<<<<<< SEARCH
            "sections": sections,
            "type": "exception",
        }
=======
            "sections": sections,
            "type": "exception",
            "chain": [
                [
                    serialize_repr_traceback(reprtraceback),
                    serialize_repr_crash(reprcrash)
                    if reprcrash is not None
                    else None,
                    descr,
                ]
                for reprtraceback, reprcrash, descr in getattr(rep, "chain", [])
            ],
        }
>>>>>>> REPLACE
<<<<<<< SEARCH
            sections = reportdict["longrepr"]["sections"]
            exception_info = ReprExceptionInfo(reprtraceback, reprcrash, sections)
            reportdict["longrepr"] = exception_info
=======
            sections = reportdict["longrepr"]["sections"]
            chain = reportdict["longrepr"].get("chain", [])
            exception_info = ReprExceptionInfo(reprtraceback, reprcrash, sections)
            exception_info.chain = [
                (
                    unserialize_repr_traceback(reprtraceback_data),
                    unserialize_repr_crash(reprcrash_data)
                    if reprcrash_data is not None
                    else None,
                    descr,
                )
                for reprtraceback_data, reprcrash_data, descr in chain
            ]
            reportdict["longrepr"] = exception_info
>>>>>>> REPLACE