zmuxuny opened a new pull request, #7114: URL: https://github.com/apache/rocketmq-dashboard/pull/7114
### Which Issue(s) This PR Fixes Fixes #7111 ### Brief Description Classify transport errors whose `net.Error.Timeout()` is true as `TIMEOUT`, instead of treating every network error as `UNAVAILABLE`. Socket/DNS deadlines need not wrap `context.DeadlineExceeded`; the existing context-only check therefore misses them. The original error message is retained, with a network/responsiveness hint. Explicit CLI/API errors, context deadlines, and cancellation keep their existing precedence. Non-timeout transport errors remain `UNAVAILABLE`. ### How Did You Test This Change? On unchanged production code, three normalization cases fail (socket, DNS, and wrapped socket timeout), as do actual `App.Execute` regressions for table, JSON, and YAML output. All report `UNAVAILABLE` instead of `TIMEOUT`. The local injected RoundTripper never contacts a server. Controls retain connection-refused, temporary non-timeout DNS, explicit CLI classification, context deadline, cancellation, and plain-error behavior. On the final tree, with Go 1.27.1: ```sh cd rmqctl GOMAXPROCS=2 GOMEMLIMIT=384MiB GOFLAGS=-p=1 go test -race -count=1 -parallel 1 -timeout 60s ./... GOMAXPROCS=2 GOMEMLIMIT=384MiB GOFLAGS=-p=1 make fmt vet build-all git diff --check ``` All passed, including catalog freshness, all module packages/scripts, and all six supported platform builds with their generated license material checks. ### Checklist - [x] One coherent change, two existing files - [x] Conventional Commit subject - [x] Regression tests added; new test uses the `Test` suffix - [x] Existing ASF headers retained; no new dependencies or UI strings - [x] Independent production/test diff review completed - [ ] Backend architecture suite (`mvn test`), not run for this Go-only change AI assistance was used for diagnosis, implementation, regression tests, independent review, and validation. No live Studio server or RocketMQ cluster was contacted. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
