{"record":{"id":"f20aaf76f0582d89","repo":"BerriAI/litellm","slug":"object-permission-cannot-be-an-empty-object-send","errorCode":null,"errorMessage":"object_permission cannot be an empty object; send null to clear it, or a non-empty object to set grants","messagePattern":"object_permission cannot be an empty object; send null to clear it, or a non-empty object to set grants","errorType":"http","errorClass":"HTTPException","httpStatus":422,"severity":"error","filePath":"litellm/proxy/management_endpoints/organization_endpoints.py","lineNumber":817,"sourceCode":"        )\n\n        try:\n            validate_model_max_budget(data.model_max_budget)\n        except ValueError as e:\n            raise HTTPException(status_code=422, detail={\"error\": str(e)})\n\n    if \"organization_alias\" in data.model_fields_set and data.organization_alias is None:\n        raise HTTPException(\n            status_code=422,\n            detail={\"error\": \"organization_alias cannot be cleared; it is required\"},\n        )\n    if \"models\" in data.model_fields_set and data.models is None:\n        raise HTTPException(\n            status_code=422,\n            detail={\"error\": \"models cannot be set to null; send [] to clear it\"},\n        )\n    if data.object_permission is not None and not data.object_permission.model_dump(exclude_none=True):\n        raise HTTPException(\n            status_code=422,\n            detail={\n                \"error\": \"object_permission cannot be an empty object; send null to clear it, or a non-empty object to set grants\"\n            },\n        )\n\n    await _verify_org_access(\n        organization_id=organization_id,\n        user_api_key_dict=user_api_key_dict,\n        prisma_client=prisma_client,\n    )\n\n    existing_organization_row: Final = await _table(OrganizationRepository(prisma_client)).find_unique(\n        where={\"organization_id\": organization_id},\n    )\n    if existing_organization_row is None:\n        raise HTTPException(\n            status_code=404,","sourceCodeStart":799,"sourceCodeEnd":835,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/management_endpoints/organization_endpoints.py#L799-L835","documentation":"Empty-object guard on organization update: object_permission was supplied as an object that serializes to no fields (all None). That would wipe existing MCP/vector-store grants without intent, so it is rejected — send null to clear or a non-empty object to set grants.","triggerScenarios":"Thrown at litellm/proxy/management_endpoints/organization_endpoints.py:817 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Send null to clear object_permission, or a non-empty object to set grants."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}