[PR #30229] fix: consolidate duplicate InvokeRateLimitError definitions #32736

Closed
opened 2026-02-21 20:51:58 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/langgenius/dify/pull/30229

State: closed
Merged: Yes


Summary

  • Remove duplicate InvokeRateLimitError from services/errors/app.py
  • Use services.errors.llm.InvokeRateLimitError in app_generate_service.py for sync user requests (has description attribute for HTTP responses)
  • Add WorkflowQuotaLimitError in services/errors/app.py for async workflow execution (simple Exception for background processing)
  • Update async_workflow_service.py to use WorkflowQuotaLimitError

Closes #30228

Test plan

  • Verify make lint passes
  • Verify make type-check passes
  • Test rate limit scenario returns HTTP 429 instead of 500
**Original Pull Request:** https://github.com/langgenius/dify/pull/30229 **State:** closed **Merged:** Yes --- ## Summary - Remove duplicate `InvokeRateLimitError` from `services/errors/app.py` - Use `services.errors.llm.InvokeRateLimitError` in `app_generate_service.py` for sync user requests (has `description` attribute for HTTP responses) - Add `WorkflowQuotaLimitError` in `services/errors/app.py` for async workflow execution (simple Exception for background processing) - Update `async_workflow_service.py` to use `WorkflowQuotaLimitError` Closes #30228 ## Test plan - [ ] Verify `make lint` passes - [ ] Verify `make type-check` passes - [ ] Test rate limit scenario returns HTTP 429 instead of 500
yindo added the pull-request label 2026-02-21 20:51:58 -05:00
yindo closed this issue 2026-02-21 20:51:58 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#32736