{"record":{"id":"d38e54381ce0fb5f","repo":"BerriAI/litellm","slug":"failed-to-initialize-cloudzero-settings-e","errorCode":null,"errorMessage":"Failed to initialize CloudZero settings: {e}","messagePattern":"Failed to initialize CloudZero settings: (.+?)","errorType":"http","errorClass":"HTTPException","httpStatus":500,"severity":"error","filePath":"litellm/proxy/spend_tracking/cloudzero_endpoints.py","lineNumber":369,"sourceCode":"            status_code=403,\n            detail={\"error\": CommonProxyErrors.not_allowed_access.value},\n        )\n\n    try:\n        # Store settings using the setter method with encryption\n        await _set_cloudzero_settings(\n            api_key=request.api_key,\n            connection_id=request.connection_id,\n            timezone=request.timezone,\n        )\n\n        verbose_proxy_logger.info(\"CloudZero settings initialized successfully\")\n\n        return CloudZeroInitResponse(message=\"CloudZero settings initialized successfully\", status=\"success\")\n\n    except Exception as e:\n        verbose_proxy_logger.error(\"Error initializing CloudZero settings: %s\", e)\n        raise HTTPException(\n            status_code=500,\n            detail={\"error\": f\"Failed to initialize CloudZero settings: {e}\"},\n        )\n\n\n@router.post(\n    \"/cloudzero/dry-run\",\n    tags=[\"CloudZero\"],\n    dependencies=[Depends(user_api_key_auth)],\n    response_model=CloudZeroExportResponse,\n)\nasync def cloudzero_dry_run_export(\n    request: CloudZeroExportRequest,\n    user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth),\n):\n    \"\"\"\n    Perform a dry run export using the CloudZero logger.\n","sourceCodeStart":351,"sourceCodeEnd":387,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/spend_tracking/cloudzero_endpoints.py#L351-L387","documentation":"Error \"Failed to initialize CloudZero settings: {e}\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/proxy/spend_tracking/cloudzero_endpoints.py:369 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the error detail (DB or validation failure); correct the init payload and retry."],"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"}