isModernRpcErrorCode

Whether a JSON-RPC error code carried in a 400/404/405 response body proves the peer speaks a *modern* MCP version (so the client should retry / correct rather than fall back to the legacy HTTP+SSE transport). Per draft basic/transports §Backward Compatibility the disambiguating modern errors a 4xx body may carry are UnsupportedProtocolVersionError (-32004), HeaderMismatch (-32001, header-validation failure), MissingRequiredClientCapabilityError (-32003), and — for a 404 to an unimplemented modern method — Method not found (-32601). These mirror the codes the SDK's own server emits via httpStatusForResponse.

pure nothrow @safe @nogc
bool
isModernRpcErrorCode
(
int code
)