{"record":{"id":"340cf83fc70505f9","repo":"sgl-project/sglang","slug":"e-340cf8","errorCode":null,"errorMessage":"{e}","messagePattern":"\\{e\\}","errorType":"http","errorClass":"HTTPException","httpStatus":400,"severity":"error","filePath":"python/sglang/srt/entrypoints/engine_info_bootstrap_server.py","lineNumber":72,"sourceCode":"                tp_rank = data[\"tp_rank\"]\n                info = data[\"transfer_engine_info\"]\n                session_id = info[\"session_id\"]\n                weights_info_dict = info[\"weights_info_dict\"]\n\n                with self.lock:\n                    self.transfer_engine_info[tp_rank] = (\n                        session_id,\n                        weights_info_dict,\n                    )\n\n                logger.info(\n                    f\"Registered transfer engine info for tp_rank={tp_rank}, \"\n                    f\"session_id={session_id}\"\n                )\n                return PlainTextResponse(\"OK\")\n            except Exception as e:\n                logger.error(f\"Failed to register engine info: {e}\")\n                raise HTTPException(status_code=400, detail=str(e))\n\n        @app.get(\"/get_transfer_engine_info\")\n        def get_transfer_engine_info(rank: int):\n            if rank < 0:\n                raise HTTPException(status_code=400, detail=\"Invalid rank parameter\")\n\n            with self.lock:\n                info = self.transfer_engine_info.get(rank)\n\n            if info is None:\n                raise HTTPException(\n                    status_code=404,\n                    detail=f\"No transfer engine info for rank {rank}\",\n                )\n\n            return {\"rank\": rank, \"remote_instance_transfer_engine_info\": list(info)}\n\n        config = uvicorn.Config(app, host=host, port=port, log_level=\"warning\")","sourceCodeStart":54,"sourceCodeEnd":90,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/srt/entrypoints/engine_info_bootstrap_server.py#L54-L90","documentation":"The /register_transfer_engine_info endpoint on the EngineInfoBootstrapServer wraps its registration logic in try/except; any exception while storing a rank's transfer-engine info (malformed payload, bad rank, internal state error) is logged and re-raised as HTTP 400 with the original message as detail.","triggerScenarios":"POSTing to /register_transfer_engine_info with a body that fails parsing/validation or triggers an internal error during registration; common when hand-testing the endpoint or when a rank's registration payload doesn't match the expected schema.","commonSituations":"Custom scripts poking the bootstrap server; version skew between the registering worker and the bootstrap server changing the payload schema; retrying a duplicate/rank-mismatched registration.","solutions":["Read the response detail — it echoes the underlying exception message which names the real problem.","Ensure the registering client and server run the same sglang version so the payload schema matches.","Don't call this endpoint manually; let the launcher's rank-0 workers perform registration."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"import requests\nr = requests.post(f\"http://{host}:{port}/register_transfer_engine_info\",\n                  json=payload, timeout=10)\nassert r.status_code == 200, r.text  # surface detail before server logs","typeGuard":null,"tryCatchPattern":"resp = requests.post(url, json=payload)\nif resp.status_code == 400:\n    logger.error(\"register rejected: %s\", resp.json().get(\"detail\"))\n    # fix payload per detail, then retry once","preventionTips":["Never hand-craft registration payloads; use the launcher's built-in registration path.","Keep client and bootstrap server on the same sglang version.","Log resp.text on any non-200 to capture the server-side exception message."],"tags":["sglang","http-400","bootstrap-server","transfer-engine"],"backgroundTag":"http-400-bad-request","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}