[PR #1636] [MERGED] fix(tongyi): improve error handling by mapping HTTP status codes to appropriate error types #2000

Closed
opened 2026-02-16 11:15:49 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langgenius/dify-official-plugins/pull/1636
Author: @laipz8200
Created: 9/2/2025
Status: Merged
Merged: 9/2/2025
Merged by: @crazywoola

Base: mainHead: feat/tongyi-not-handle-provider-error-correctly


📝 Commits (1)

  • 73b1ec1 fix(tongyi): improve error handling by mapping HTTP status codes to appropriate error types

📊 Changes

2 files changed (+34 additions, -5 deletions)

View changed files

📝 models/tongyi/manifest.yaml (+1 -1)
📝 models/tongyi/models/llm/llm.py (+33 -4)

📄 Description

Related Issues or Context

Fixes #1635

This PR contains Changes to Non-Plugin

  • Documentation
  • Other

This PR contains Changes to Non-LLM Models Plugin

  • I have Run Comprehensive Tests Relevant to My Changes

This PR contains Changes to LLM Models Plugin

  • My Changes Affect Message Flow Handling (System Messages and User→Assistant Turn-Taking)

  • My Changes Affect Tool Interaction Flow (Multi-Round Usage and Output Handling, for both Agent App and Agent Node)

  • My Changes Affect Multimodal Input Handling (Images, PDFs, Audio, Video, etc.)

  • My Changes Affect Multimodal Output Generation (Images, Audio, Video, etc.)

  • My Changes Affect Structured Output Format (JSON, XML, etc.)

  • My Changes Affect Token Consumption Metrics

  • My Changes Affect Other LLM Functionalities (Reasoning Process, Grounding, Prompt Caching, etc.)

  • Other Changes (Add New Models, Fix Model Parameters etc.)

Version Control (Any Changes to the Plugin Will Require Bumping the Version)

  • I have Bumped Up the Version in Manifest.yaml (Top-Level Version Field, Not in Meta Section)

Dify Plugin SDK Version

  • I have Ensured dify_plugin>=0.3.0,<0.5.0 is in requirements.txt (SDK docs)

Environment Verification (If Any Code Changes)

Local Deployment Environment

  • Dify Version is: 1.8.0, I have Tested My Changes on Local Deployment Dify with a Clean Environment That Matches the Production Configuration.

SaaS Environment

  • I have Tested My Changes on cloud.dify.ai with a Clean Environment That Matches the Production Configuration

🤖 Generated with Claude Code and reviewed by @laipz8200


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/langgenius/dify-official-plugins/pull/1636 **Author:** [@laipz8200](https://github.com/laipz8200) **Created:** 9/2/2025 **Status:** ✅ Merged **Merged:** 9/2/2025 **Merged by:** [@crazywoola](https://github.com/crazywoola) **Base:** `main` ← **Head:** `feat/tongyi-not-handle-provider-error-correctly` --- ### 📝 Commits (1) - [`73b1ec1`](https://github.com/langgenius/dify-official-plugins/commit/73b1ec1729d36922eb3ad7b08c95f0a10f253ebf) fix(tongyi): improve error handling by mapping HTTP status codes to appropriate error types ### 📊 Changes **2 files changed** (+34 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `models/tongyi/manifest.yaml` (+1 -1) 📝 `models/tongyi/models/llm/llm.py` (+33 -4) </details> ### 📄 Description ## Related Issues or Context Fixes #1635 ## This PR contains Changes to *Non-Plugin* - [ ] Documentation - [ ] Other ## This PR contains Changes to *Non-LLM Models Plugin* - [ ] I have Run Comprehensive Tests Relevant to My Changes ## This PR contains Changes to *LLM Models Plugin* - [ ] My Changes Affect Message Flow Handling (System Messages and User→Assistant Turn-Taking) - [ ] My Changes Affect Tool Interaction Flow (Multi-Round Usage and Output Handling, for both Agent App and Agent Node) - [ ] My Changes Affect Multimodal Input Handling (Images, PDFs, Audio, Video, etc.) - [ ] My Changes Affect Multimodal Output Generation (Images, Audio, Video, etc.) - [ ] My Changes Affect Structured Output Format (JSON, XML, etc.) - [ ] My Changes Affect Token Consumption Metrics - [ ] My Changes Affect Other LLM Functionalities (Reasoning Process, Grounding, Prompt Caching, etc.) <!-- This change improves error handling by properly categorizing different types of API errors instead of treating all as service unavailable errors --> - [x] Other Changes (Add New Models, Fix Model Parameters etc.) ## Version Control (Any Changes to the Plugin Will Require Bumping the Version) - [x] I have Bumped Up the Version in Manifest.yaml (Top-Level `Version` Field, Not in Meta Section) ## Dify Plugin SDK Version - [x] I have Ensured `dify_plugin>=0.3.0,<0.5.0` is in requirements.txt ([SDK docs](https://github.com/langgenius/dify-plugin-sdks/blob/main/python/README.md)) ## Environment Verification (If Any Code Changes) ### Local Deployment Environment - [x] Dify Version is: 1.8.0, I have Tested My Changes on Local Deployment Dify with a Clean Environment That Matches the Production Configuration. ### SaaS Environment - [ ] I have Tested My Changes on cloud.dify.ai with a Clean Environment That Matches the Production Configuration 🤖 Generated with [Claude Code](https://claude.ai/code) and reviewed by @laipz8200 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 11:15:49 -05:00
yindo closed this issue 2026-02-16 11:15:49 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-official-plugins#2000