feat: add gateway client with env-driven assembly
Includes config aggregation for multi-source env keys, from_env and from_settings factories with explicit shared-backend injection, gather_bounded, top-level exports, tightened import-linter layers with the gate removed from the Makefile, and the finalized .env.example.
This commit is contained in:
@@ -87,7 +87,9 @@ class GatewayUnavailableError(PolyGatewayError):
|
||||
reasons = dict(per_source_reasons or {})
|
||||
for src, src_reason in reasons.items():
|
||||
if src_reason not in SOURCE_REASONS:
|
||||
raise ValueError(f"源 {src!r} 的 reason 非法: {src_reason!r}(允许: {sorted(SOURCE_REASONS)})")
|
||||
raise ValueError(
|
||||
f"源 {src!r} 的 reason 非法: {src_reason!r}(允许: {sorted(SOURCE_REASONS)})"
|
||||
)
|
||||
super().__init__(f"{scope.lower()} 网关暂时不可用: {reason}", source_name=source_name)
|
||||
self.scope = scope.lower()
|
||||
self.reason = reason
|
||||
|
||||
Reference in New Issue
Block a user