fix: replace bare string raises with proper exception types (#22446)
`raise "string"` in Python raises TypeError instead of the intended error, making error messages confusing and debugging difficult. Co-authored-by: gambletan <ethanchang32@gmail.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
gambletan
Claude Opus 4.6
parent
abe865f4f3
commit
2c35bdbcf5
@@ -1747,7 +1747,7 @@ async def download_file_stream(
|
||||
|
||||
yield f"data: {json.dumps(res)}\n\n"
|
||||
else:
|
||||
raise "Ollama: Could not create blob, Please try again."
|
||||
raise RuntimeError("Ollama: Could not create blob, Please try again.")
|
||||
|
||||
|
||||
# url = "https://huggingface.co/TheBloke/stablelm-zephyr-3b-GGUF/resolve/main/stablelm-zephyr-3b.Q2_K.gguf"
|
||||
|
||||
Reference in New Issue
Block a user