Date: 2026-03-09 Branch: NOJIRA-Fix-RPC-silent-response-drop Issue: https://github.com/voipbin/monorepo-monitoring/issues/75
GET /speakings returns HTTP 400 after error-path requests (DELETE/POST to non-existent speaking IDs). The API validator test test_list_speakings_schema_validation consistently fails when run as part of the full test suite but passes in isolation.
- TTS listenhandler methods (e.g.,
v1SpeakingsIDGet,v1SpeakingsIDDelete) return(nil, err)when the underlying speaking operation fails. executeConsumeRPCin rabbitmqhandler silently drops the RPC response when the handler callback returns(nil, err)— no reply is sent to the caller's ReplyTo queue.- The RPC caller times out after 3 seconds (
requestTimeoutDefault = 3000). - The circuit breaker records each timeout as a transport-level failure.
- Five error-path tests produce exactly 5 consecutive transport failures, which trips the circuit breaker (
defaultFailureThreshold = 5). - The circuit breaker stays open for 30 seconds (
defaultOpenDuration = 30s). - The subsequent
GET /speakingsrequest is rejected by the circuit breaker before it ever reaches the TTS service. - The test retries for only 24 seconds (8 attempts x 3s), which is not enough to outlast the 30-second open duration.
Add publishRPCErrorResponse to executeConsumeRPC: when a handler callback returns an error and a ReplyTo address exists, send a 500 error response back to the caller instead of dropping the response. This ensures the caller always receives a reply and records an application-level error (not a transport timeout), which does not trip the circuit breaker.
Change all TTS listenhandler methods to return (simpleResponse(statusCode), nil) instead of (nil, err). Status codes: 400 for bad requests/unmarshal errors, 404 for not-found, 500 for internal/marshal errors. This is the correct pattern — handler methods should always return a sock.Response with an appropriate status code, not a Go error.
bin-common-handler/pkg/rabbitmqhandler/consume.go— AddedpublishRPCErrorResponsemethod and modifiedexecuteConsumeRPCto call it on errorbin-tts-manager/pkg/listenhandler/v1_speakings.go— Changed all error returns from(nil, err)to(simpleResponse(statusCode), nil)
- bin-common-handler:
go test ./...passes,golangci-lintclean (0 issues) - bin-tts-manager:
go test ./...passes,golangci-lintclean (1 pre-existing unrelated issue in dbhandler test)