{"record":{"id":"0ead195875f930bf","repo":"BerriAI/litellm","slug":"response-from-opik-api-status-code-response-stat","errorCode":null,"errorMessage":"Response from opik API status_code: {response.status_code}, text: {response.text}","messagePattern":"Response from opik API status_code: (.+?), text: (.+?)","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"litellm/integrations/opik/opik.py","lineNumber":175,"sourceCode":"                    \"OpikLogger added event to log_queue - Will flush in %s seconds...\", self.flush_interval\n                )\n\n                if len(self.log_queue) >= self.batch_size:\n                    verbose_logger.debug(\"OpikLogger - Flushing batch\")\n                    await self.flush_queue()\n        except Exception as e:\n            verbose_logger.exception(\"OpikLogger failed to log success event - %s\\n%s\", e, traceback.format_exc())\n\n    def _sync_send(self, url: str, headers: dict[str, str], batch: dict[str, Any]) -> None:\n        try:\n            response: Final = self.sync_httpx_client.post(\n                url=url,\n                headers=headers,\n                json=batch,\n            )\n            response.raise_for_status()\n            if response.status_code != 204:\n                raise Exception(f\"Response from opik API status_code: {response.status_code}, text: {response.text}\")\n        except Exception as e:\n            verbose_logger.exception(\"OpikLogger failed to send batch - %s\\n%s\", e, traceback.format_exc())\n\n    def log_success_event(\n        self,\n        kwargs: dict[str, Any],\n        response_obj: Any,\n        start_time: datetime,\n        end_time: datetime,\n    ) -> None:\n        try:\n            if _should_skip_event(kwargs):\n                return\n\n            # Build payload using the payload builder\n            trace_payload, span_payload = opik_payload_builder.build_opik_payload(\n                kwargs=kwargs,\n                response_obj=response_obj,","sourceCodeStart":157,"sourceCodeEnd":193,"githubUrl":"https://github.com/BerriAI/litellm/blob/6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d/litellm/integrations/opik/opik.py#L157-L193","documentation":"Error \"Response from opik API status_code: {response.status_code}, text: {response.text}\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/integrations/opik/opik.py:175 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the Opik API key, workspace, and endpoint; see status_code and text for details."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d","analyzedAt":"2026-08-15T07:12:03.035Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}