sgl-project/sglang · error · HTTPException
Mesh not found
Error message
Mesh not found
What it means
GET on /mesh/{mesh_id} looked up the job in MESH_STORE and found nothing, returning HTTP 404. Either the id was never issued, the job expired, or it was deleted.
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)
Solutions
- Check the id against the one returned by the POST that created the job
- If the server restarted, re-submit the generation request
- 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
- Persist create-response ids durably
- Expect in-memory store to reset on restart
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
- Failed to process image source: {str(e)}
- Invalid request body: {e}
- An input image is required for mesh generation
- Mesh has been uploaded to cloud storage. Please use the clou
- Generation is still in-progress
AI-assisted analysis of sgl-project/sglang@0132848349 (2026-08-28).
Data as JSON: /api/errors/aa1818953a28e17f.
Report an issue: GitHub.