raise_for_status_with_text() — langchain Function Reference
Architecture documentation for the raise_for_status_with_text() function in utils.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD b3da7004_49fa_4d12_30b7_02ef7805923c["raise_for_status_with_text()"] b77fd012_b825_e350_c8f5_a8f1b44997d9["utils.py"] b3da7004_49fa_4d12_30b7_02ef7805923c -->|defined in| b77fd012_b825_e350_c8f5_a8f1b44997d9 style b3da7004_49fa_4d12_30b7_02ef7805923c fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/langchain_core/utils/utils.py lines 58–70
def raise_for_status_with_text(response: Response) -> None:
"""Raise an error with the response text.
Args:
response: The response to check for errors.
Raises:
ValueError: If the response has an error status code.
"""
try:
response.raise_for_status()
except HTTPError as e:
raise ValueError(response.text) from e
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does raise_for_status_with_text() do?
raise_for_status_with_text() is a function in the langchain codebase, defined in libs/core/langchain_core/utils/utils.py.
Where is raise_for_status_with_text() defined?
raise_for_status_with_text() is defined in libs/core/langchain_core/utils/utils.py at line 58.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free