mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-04 02:03:44 +00:00
update
This commit is contained in:
parent
8d63cb405d
commit
33c7bd6c09
4 changed files with 112 additions and 6 deletions
|
|
@ -165,13 +165,13 @@ class TestTranslateException:
|
|||
assert result.detail == "Internal server error: An unexpected error occurred."
|
||||
|
||||
def test_translate_runtime_error(self):
|
||||
"""Test that RuntimeError is translated to 500 HTTP status with actual error message."""
|
||||
"""Test that RuntimeError without a sanitizer rule returns generic server error."""
|
||||
exc = RuntimeError("Runtime error")
|
||||
result = translate_exception(exc)
|
||||
|
||||
assert isinstance(result, HTTPException)
|
||||
assert result.status_code == 500
|
||||
assert result.detail == "Runtime error"
|
||||
assert result.detail == "Internal server error: An unexpected error occurred."
|
||||
|
||||
def test_multiple_access_denied_scenarios(self):
|
||||
"""Test various scenarios that should result in 403 status codes."""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue