[openapi server] log exception in exception handler(2/N) (#36201)
Signed-off-by: Andy Xie <andy.xning@gmail.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user