From fdf636ce95d7c7b847ca90c27278bc43bf444605 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=BE=B7=E5=AE=87?= Date: Sun, 4 Oct 2026 13:19:42 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=A5=E5=85=85(=E4=BC=9A=E5=91=98=E9=94=99?= =?UTF-8?q?=E8=AF=AF)=EF=BC=9A=E5=85=91=E6=8D=A2=E7=A0=81=E9=93=BE?= =?UTF-8?q?=E8=B7=AF=E7=95=99=20TODO=20=E6=8E=A5=E5=85=A5=20typed=20error?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - is_runtime_profile_redeem_code_domain_error 顶部注明仍靠中文文案匹配判 400 - 指明后续按 RuntimeProfileMembershipErrorCode + ProcedureRejected 的做法改造 --- server-rs/crates/api-server/src/runtime_profile.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/server-rs/crates/api-server/src/runtime_profile.rs b/server-rs/crates/api-server/src/runtime_profile.rs index acd944add..0677ef55b 100644 --- a/server-rs/crates/api-server/src/runtime_profile.rs +++ b/server-rs/crates/api-server/src/runtime_profile.rs @@ -1500,6 +1500,9 @@ fn is_runtime_profile_domain_error(error: &SpacetimeClientError) -> bool { } } +// TODO(refactor): 兑换码链路尚未接入 typed error code,仍靠中文文案匹配判 400; +// 后续按会员链路(RuntimeProfileMembershipErrorCode + SpacetimeClientError::ProcedureRejected) +// 的做法,让 module 侧兑换码拒绝也携带机器可读错误码。 fn is_runtime_profile_redeem_code_domain_error(message: &str) -> bool { matches!( message,