[openapi server] log exception in exception handler(2/N) (#36201)

Signed-off-by: Andy Xie <andy.xning@gmail.com>
This commit is contained in:
Ning Xie
2026-03-11 11:16:30 +08:00
committed by GitHub
parent 8ab3d7427c
commit fe714dd507
16 changed files with 63 additions and 113 deletions

View File

@@ -36,7 +36,31 @@ class VLLMValidationError(ValueError):
return f"{base} ({', '.join(extras)})" if extras else base
class VLLMNotFoundError(ValueError):
class VLLMNotFoundError(Exception):
"""vLLM-specific NotFoundError"""
pass
class LoRAAdapterNotFoundError(VLLMNotFoundError):
"""Exception raised when a LoRA adapter is not found.
This exception is thrown when a requested LoRA adapter does not exist
in the system.
Attributes:
message: The error message string describing the exception
"""
message: str
def __init__(
self,
lora_name: str,
lora_path: str,
) -> None:
message = f"Loading lora {lora_name} failed: No adapter found for {lora_path}"
self.message = message
def __str__(self):
return self.message