{"record":{"id":"f9e2d2525e385b6d","repo":"BerriAI/litellm","slug":"cloudzero-settings-not-found-please-initialize-se","errorCode":null,"errorMessage":"CloudZero settings not found. Please initialize settings first using /cloudzero/init","messagePattern":"CloudZero settings not found\\. Please initialize settings first using /cloudzero/init","errorType":"http","errorClass":"HTTPException","httpStatus":404,"severity":"error","filePath":"litellm/proxy/spend_tracking/cloudzero_endpoints.py","lineNumber":234,"sourceCode":"            request.connection_id if request.connection_id is not None else current_settings[\"connection_id\"]\n        )\n        updated_timezone: Final = request.timezone if request.timezone is not None else current_settings[\"timezone\"]\n\n        # Store updated settings using the setter method with encryption\n        await _set_cloudzero_settings(\n            api_key=updated_api_key,\n            connection_id=updated_connection_id,\n            timezone=updated_timezone,\n        )\n\n        verbose_proxy_logger.info(\"CloudZero settings updated successfully\")\n\n        return CloudZeroInitResponse(message=\"CloudZero settings updated successfully\", status=\"success\")\n\n    except HTTPException as e:\n        if e.status_code == 400:\n            # Settings not configured yet\n            raise HTTPException(\n                status_code=404,\n                detail={\n                    \"error\": \"CloudZero settings not found. Please initialize settings first using /cloudzero/init\"\n                },\n            )\n        raise e\n    except Exception as e:\n        verbose_proxy_logger.error(\"Error updating CloudZero settings: %s\", e)\n        raise HTTPException(\n            status_code=500,\n            detail={\"error\": f\"Failed to update CloudZero settings: {e}\"},\n        )\n\n\n# Global variable to track if CloudZero background job has been initialized\n_cloudzero_background_job_initialized: Final = False\n\n","sourceCodeStart":216,"sourceCodeEnd":252,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/spend_tracking/cloudzero_endpoints.py#L216-L252","documentation":"Error \"CloudZero settings not found. Please initialize settings first using /cloudzero/init\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/proxy/spend_tracking/cloudzero_endpoints.py:234 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Initialize CloudZero settings first via POST /cloudzero/init, then retry the update."],"exampleFix":null,"handlingStrategy":null,"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"}