mirror of
https://github.com/wassname/openrouter-python-sdk-retry-errors.git
synced 2026-08-01 12:40:23 +08:00
first commit
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
||||
|
||||
import httpx
|
||||
from typing import Optional
|
||||
|
||||
from openrouter.errors import OpenRouterError
|
||||
|
||||
|
||||
class ResponseValidationError(OpenRouterError):
|
||||
"""Error raised when there is a type mismatch between the response data and the expected Pydantic model."""
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
message: str,
|
||||
raw_response: httpx.Response,
|
||||
cause: Exception,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = f"{message}: {cause}"
|
||||
super().__init__(message, raw_response, body)
|
||||
|
||||
@property
|
||||
def cause(self):
|
||||
"""Normally the Pydantic ValidationError"""
|
||||
return self.__cause__
|
||||
Reference in New Issue
Block a user