[Fix] Error Handling: Update setter methods to clarify None value handling and enhance authentication failure response policy.

This commit is contained in:
misyaguziya
2025-12-30 07:52:08 +09:00
parent 588b95eebe
commit 01061cf98f
3 changed files with 12 additions and 6 deletions

View File

@@ -693,7 +693,13 @@ OSC Query 機能が無効になったことを通知。無効化された機能
- `config.AUTH_KEYS["DeepL_API"]` に保存
- `config.SELECTABLE_TRANSLATION_ENGINE_STATUS["DeepL_API"]` を True に
- `updateTranslationEngineAndEngineList()` を呼び出し
4. 認証失敗時: status 400 を返却
4. 認証失敗時 (status 400):
- レスポンス `data` フィールドは **常に None**(キーを返さない)
- `delDeeplAuthKey()` を呼び出してクリーンアップ
**認証失敗時の共通ポリシーPlamo/Gemini/OpenAI/DeepL/Groq/OpenRouter 共通)**
- レスポンス `data` はキーを含めず `None` を返す
- 対応する `del*AuthKey()` を呼び出し、保存済みキーとモデル選択をクリア
#### `delDeeplAuthKey(*args, **kwargs) -> dict`