mirror of
https://github.com/langgenius/dify-plugin-sdks.git
synced 2026-07-22 02:15:22 -04:00
[PR #90] [MERGED] feat(python): Add specific error classes for StorageInvocation #138
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/langgenius/dify-plugin-sdks/pull/90
Author: @QuantumGhost
Created: 4/14/2025
Status: ✅ Merged
Merged: 4/15/2025
Merged by: @Yeuoly
Base:
main← Head:refactor/storage-invocation-exc📝 Commits (5)
b54d8e4feat(python): Add specific error classes for StorageInvocationf2fe7e3test(python): Add test cases forStorageInvocationdb4fafdchore(python): fix linter violations7ed3d17feat(python): Change the exceptionStorageInvocation.existraised865cafatest(python): Add test cases forStorageInvocation.exist.📊 Changes
2 files changed (+110 additions, -7 deletions)
View changed files
📝
python/dify_plugin/invocations/storage.py(+32 -7)➕
python/tests/invocations/test_storage.py(+78 -0)📄 Description
Replace generic
Exceptionraises withNotFoundErrorwhen the key is missing,and
StorageInvocationErrorfor other response errors. This improves errorhandling at call sites by avoiding overly generic exceptions.
Add correspond tests for exception raising logic.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.