Files
MoviePilot/app/modules/themoviedb/tmdbv3api/exceptions.py
T
jxxghp 4345fcfa22 refactor(chain): chain 与 module 仅经 run_module 契约互联,实现模块内容封闭
- mTorrent 字幕链接解析下沉为 IndexerModule.site_subtitle_links,subtitle 模块自行跳过 API 站点
- TMDB/MusicBrainz 识别缓存管理改为模块方法(tmdb_cache_*/music_cache_*)经 run_module 分发
- WechatClawBot 客户端查找/临时客户端/缓存迁移内聚为 wechatclawbot_* 模块方法,
  chain 移除 WechatClawBot 类与 ModuleManager 内省
- LISTENBRAINZ_* 常量迁至 schemas/types.py,模块与链层再导入保持兼容
- TMDbException 升为 schemas/exception.py 跨层契约,vendored 异常保持类身份一致
- 架构守护测试新增 test_chain_does_not_import_module_internals(共 18 项)
- 文档同步:chain->module 仅允许 run_module 分发,直接导入禁止
2026-08-16 05:25:28 +08:00

18 lines
824 B
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# TMDbException 是跨层异常契约,定义在 schemas 层,供链层与API层捕获;
# 模块内部沿用原导入路径,保持类身份一致
from app.schemas.exception import TMDbException # noqa: F401
class TMDbConnectionError(TMDbException):
"""
TMDB连接失败异常。
仅在确认为传输层/响应格式问题(如底层HTTP请求失败、响应无法解析为JSON)时抛出,
与TMDB业务层明确返回的错误(如404条目不存在、参数错误等,仍抛出普通TMDbException
区分开,便于上层区分"网络故障,请重试"与"条目确实不存在"两类完全不同的处理与文案。
继承自TMDbException,因此现有 `except TMDbException` 代码路径无需修改即可
继续捕获本异常,保持向后兼容。
"""
pass