{"record":{"id":"7f1c0c93ce6dca9a","repo":"paascloud/paascloud-master","slug":"gl99990002-7f1c0c","errorCode":"GL99990002","errorMessage":"GL99990002","messagePattern":"GL99990002","errorType":"error_code","errorClass":"TpcBizException","httpStatus":null,"severity":"error","filePath":"paascloud-provider/paascloud-provider-tpc/src/main/java/com/paascloud/provider/service/MdcRpcService.java","lineNumber":41,"sourceCode":"\nimport javax.annotation.Resource;\n\n/**\n * The class Mdc rpc service.\n *\n * @author paascloud.net @gmail.com\n */\n@Slf4j\n@Service\npublic class MdcRpcService {\n\t@Resource\n\tprivate MdcMqMessageFeignApi mdcMqMessageFeignApi;\n\n\tpublic Wrapper<PageInfo<MqMessageVo>> queryMessageListWithPage(final MessageQueryDto messageQueryDto) {\n\t\tWrapper<PageInfo<MqMessageVo>> wrapper = mdcMqMessageFeignApi.queryMessageListWithPage(messageQueryDto);\n\t\tif (wrapper == null) {\n\t\t\tlog.error(\"查询消息记录. 失败 result is null\");\n\t\t\tthrow new TpcBizException(ErrorCodeEnum.GL99990002);\n\t\t}\n\t\treturn wrapper;\n\t}\n}","sourceCodeStart":23,"sourceCodeEnd":45,"githubUrl":"https://github.com/paascloud/paascloud-master/blob/781281a9503332ed3cef44ea618349d14230a127/paascloud-provider/paascloud-provider-tpc/src/main/java/com/paascloud/provider/service/MdcRpcService.java#L23-L45","documentation":"GL99990002 (the platform's generic 'remote call returned null / failed' business error) is thrown by MdcRpcService.queryMessageListWithPage when the Feign call to mdcMqMessageFeignApi.queryMessageListWithPage returns null. A null Wrapper means the downstream UAC/MDC service call failed at the RPC layer (no result envelope was produced), so the service converts it into a TpcBizException.","triggerScenarios":"Calling MdcRpcService.queryMessageListWithPage(messageQueryDto) when the Feign client for the MDC message API returns null — typically because the downstream service is down, the call timed out, or a fallback returned null.","commonSituations":"MDC service not registered in the registry or scaled to zero; network timeout between TPC and MDC; Feign fallback configured to return null on failure; mismatched service name in @FeignClient after a rename.","solutions":["Check whether the MDC service is up and registered under the name the @FeignClient expects.","Inspect TPC logs/gateway for the underlying Feign exception (timeout, connection refused) that produced the null result.","Fix any Feign fallback that swallows the real error and returns null; prefer throwing or returning an error Wrapper.","Retry the query — transient network issues are a common cause.","Verify the query payload (MessageQueryDto) does not cause the downstream endpoint to fail validation."],"exampleFix":"// before: null Feign result propagates as exception\nWrapper<PageInfo<MqMessageVo>> w = mdcRpcService.queryMessageListWithPage(dto);\n// after: guard and degrade gracefully\ntry {\n    Wrapper<PageInfo<MqMessageVo>> w = mdcRpcService.queryMessageListWithPage(dto);\n    return w.getResult();\n} catch (TpcBizException e) {\n    log.warn(\"MDC message query unavailable, returning empty page\", e);\n    return new PageInfo<>(Collections.emptyList());\n}","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n    Wrapper<PageInfo<MqMessageVo>> w = mdcRpcService.queryMessageListWithPage(dto);\n    return w.getResult();\n} catch (TpcBizException e) {\n    if (e.getCode() == 99990002L) {\n        log.warn(\"MDC RPC returned null — serving degraded result\");\n        return emptyPage();\n    }\n    throw e;\n}","preventionTips":["Never let Feign fallbacks return null — throw or return error Wrappers.","Set sensible Feign/ribbon timeouts and retries for read endpoints.","Health-check downstream MDC service before dependent flows.","Alert on GL99990002 frequency as an RPC-health signal.","Pin the @FeignClient service name in config to survive renames."],"tags":["feign","rpc","downstream"],"backgroundTag":"upstream-api-error","analyzedSha":"781281a9503332ed3cef44ea618349d14230a127","analyzedAt":"2026-09-10T10:59:02.070Z","contentChangedAt":"2026-09-10T10:59:02.070Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}