paascloud/paascloud-master · error · MdcBizException
GL99990002
GL99990002
Error message
GL99990002
What it means
MdcAddressServiceImpl.getAddressById throws MdcBizException(GL99990002) when the Wrapper returned by mdcAddressQueryFeignApi.getById(addressId) is null — i.e. the Feign call to the mdc (mall directory center) address service returned no wrapper object at all. GL99990002 is the generic 'MDC service call returned null/failed' code; a non-null but error() wrapper raises MDC10021002 instead.
Solutions
- Check mdc service health/logs for the getById request corresponding to this addressId
- Verify the addressId actually exists in the mdc address table
- Ensure the Feign client's decoder is configured to wrap empty bodies (or return a fallback Wrapper) instead of null
- Confirm mdc service registration/discovery (Eureka) so the Feign call reaches a live instance
Example fix
// before
Wrapper<AddressDTO> wrapper = mdcAddressQueryFeignApi.getById(addressId);
// after (server-side)
return Wrapper.ok(addressMapper.selectByPrimaryKey(addressId)); // never return a bare/empty body
// caller-side
if (wrapper == null) { throw new MdcBizException(ErrorCodeEnum.GL99990002); } Defensive patterns
Strategy: fallback
Validate before calling
boolean exists = addressMapper.selectCount(new QueryWrapper().eq("id", addressId)) > 0; // verify locally before RPC Type guard
if (wrapper == null || wrapper.getResult() == null) { return Optional.empty(); }
return Optional.of(wrapper.getResult()); Try / catch
try { return addressService.getAddressById(id); } catch (MdcBizException e) { if (ErrorCodeEnum.GL99990002.getCode().equals(e.getCode())) { log.error("mdc returned null wrapper for addressId={}", id, e); return defaultAddress(); } throw e; } Prevention
- Make downstream mdc endpoints always return a Wrapper (Wrapper.fail for not-found), never an empty body
- Configure Feign fallbacks so transient mdc outages return a degraded result
- Validate addressId existence before RPC when the caller already owns the data
- Monitor mdc service health and alert on rising null-wrapper rates
When it happens
Trigger: Calling getAddressById when the downstream mdc service responds with an empty body (Feign decode produces null Wrapper), e.g. the remote endpoint returned nothing for that addressId or the response could not be deserialized.
Common situations: mdc service down or returning empty 200 bodies; Feign decoder configuration mismatch (empty body -> null); nonexistent addressId hitting an endpoint that returns no wrapper; network/proxy issues yielding empty responses.
Related errors
AI-assisted analysis of paascloud/paascloud-master@781281a950 (2026-09-10).
Data as JSON: /api/errors/80d11bd03e4994be.
Report an issue: GitHub.
Appendix: source
Thrown at paascloud-provider/paascloud-provider-uac/src/main/java/com/paascloud/provider/service/impl/MdcAddressServiceImpl.java:33
/**
* The class Mdc address service.
*
* @author paascloud.net @gmail.com
*/
@Service
@Transactional(rollbackFor = Exception.class)
public class MdcAddressServiceImpl implements MdcAddressService {
@Resource
private MdcAddressQueryFeignApi mdcAddressQueryFeignApi;
@Override
@Transactional(readOnly = true, rollbackFor = Exception.class)
public AddressDTO getAddressById(Long addressId) {
Preconditions.checkArgument(addressId != null, "地址ID不能为空");
Wrapper<AddressDTO> wrapper = mdcAddressQueryFeignApi.getById(addressId);
if (wrapper == null) {
throw new MdcBizException(ErrorCodeEnum.GL99990002);
}
if (wrapper.error()) {
throw new MdcBizException(ErrorCodeEnum.MDC10021002);
}
return wrapper.getResult();
}
}
View on GitHub (pinned to 781281a950)