Look up an insurance error code to retrieve its human-readable description, root cause, and step-by-step resolution instructions when a product model validation error is encountered during setup.
API Version
68.0
Requires Chatter
No
Signature
public static ConnectApi.InsLookupErrorCodeRepresentation lookupErrorCode(ConnectApi.InsLookupErrorCodeInputRepresentation insLookupErrorCodeInputRepresentation)
Use this method at design time to resolve an insurance error code such as SF-INS-DSAV-00001. Provide the error code string. The method matches it against registered insurance error codes and returns the description, optional cause, and resolution instructions.
When the error code is known, the response includes the registered description and, when available, localized resolution instructions. When the error code isn’t registered, the method still returns a result with an informative “not found” description and format guidance in instructions.
When required input is missing, errors can include request-level failures such as:
SF-INS-DSAV-00040 — the error code wasn’t specified. Provide a valid insurance error code.
Example
This sample looks up an insurance error code from Apex.
1ConnectApi.InsLookupErrorCodeInputRepresentation input =2 new ConnectApi.InsLookupErrorCodeInputRepresentation();3input.errorCode = 'SF-INS-DSAV-00029';45ConnectApi.InsLookupErrorCodeRepresentation result =6 ConnectApi.InsuranceDesignAdvisorFamily.lookupErrorCode(input);78System.debug('errorCode=' + result.errorCode);9System.debug('errorDescription=' + result.errorDescription);10System.debug('errorCause=' + result.errorCause);11System.debug('instructions=' + result.instructions);12System.debug('errors=' + result.errors);