Fix collaboration mode error classifier

This commit is contained in:
canvrno-oai
2026-05-04 14:51:10 -07:00
parent bd73e5e160
commit 4a7184353c

View File

@@ -134,11 +134,12 @@ fn bootstrap_request_error(context: &'static str, err: TypedRequestError) -> col
fn is_missing_collaboration_mode_list_error(err: &TypedRequestError) -> bool {
match err {
TypedRequestError::Server { method, source } if method == "collaborationMode/list" => {
source.code == JSONRPC_METHOD_NOT_FOUND_ERROR_CODE
|| (source.code == JSONRPC_INVALID_REQUEST_ERROR_CODE
&& source.message.contains("collaborationMode/list")
&& source.message.contains("unknown variant"))
TypedRequestError::Server { method, source } => {
method == "collaborationMode/list"
&& (source.code == JSONRPC_METHOD_NOT_FOUND_ERROR_CODE
|| (source.code == JSONRPC_INVALID_REQUEST_ERROR_CODE
&& source.message.contains("collaborationMode/list")
&& source.message.contains("unknown variant")))
}
TypedRequestError::Transport { .. } | TypedRequestError::Deserialize { .. } => false,
}