sgl-project/sglang · error · HTTPException

Mesh not found

Error message

Mesh not found

What it means

The mesh API could not find the requested mesh resource. Verify the mesh id and that it was registered/created before the request.

Solutions

  1. Check the id against the one returned by the POST that created the job
  2. If the server restarted, re-submit the generation request
  3. Confirm the job hasn't been deleted via DELETE /{mesh_id}
Defensive patterns

Strategy: try-catch

Validate before calling

job = (await client.get(f'/v1/mesh/{mesh_id}')).json()
if job.get('detail') == 'Mesh not found': re_submit = True

Try / catch

if resp.status_code == 404:
    # job lost (restart/TTL): re-submit the generation request

Prevention

When it happens

Trigger: Polling GET /v1/mesh/{mesh_id} with an id that does not exist in the in-memory store (typo, expired entry, or server restart wiping the store).

Common situations: Server restarted (MESH_STORE is in-memory), job TTL cleanup removed it, copy/paste error in the id, or polling after a DELETE.

Understand the failure class

Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.

Related errors


AI-assisted analysis of sgl-project/sglang@0132848349 (2026-08-28). Data as JSON: /api/errors/aa1818953a28e17f. Report an issue: GitHub.

Appendix: source

Thrown at python/sglang/multimodal_gen/runtime/entrypoints/openai/mesh_api.py:241

    return MeshResponse(**job)


@router.get("", response_model=MeshListResponse)
async def list_meshes(
    after: Optional[str] = Query(None),
    limit: Optional[int] = Query(None, ge=1, le=100),
    order: Optional[str] = Query("desc"),
):
    jobs = await MESH_STORE.list_page(after=after, limit=limit, order=order)
    items = [MeshResponse(**job) for job in jobs]
    return MeshListResponse(data=items)


@router.get("/{mesh_id}", response_model=MeshResponse)
async def retrieve_mesh(mesh_id: str = Path(...)):
    job = await MESH_STORE.get(mesh_id)
    if not job:
        raise HTTPException(status_code=404, detail="Mesh not found")
    return MeshResponse(**job)


@router.delete("/{mesh_id}", response_model=MeshResponse)
async def delete_mesh(mesh_id: str = Path(...)):
    job = await MESH_STORE.pop(mesh_id)
    if not job:
        raise HTTPException(status_code=404, detail="Mesh not found")
    job["status"] = "deleted"
    return MeshResponse(**job)


@router.get("/{mesh_id}/content")
async def download_mesh_content(
    mesh_id: str = Path(...), variant: Optional[str] = Query(None)
):
    job = await MESH_STORE.get(mesh_id)
    if not job:

View on GitHub (pinned to 0132848349)