---
schema_version: "1"
id: b7aeb5165ba7ed9d83e8b5490bd15be53a0eed83453190344bd49ad3d77ca566
title: lookupErrorCode(insLookupErrorCodeInputRepresentation)
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/insurance_developer_guide/apex_ConnectAPI_InsuranceDesignAdvisorFamily_lookupErrorCode_1.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.insurance_developer_guide.meta/insurance_developer_guide/apex_ConnectAPI_InsuranceDesignAdvisorFamily_lookupErrorCode_1.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 589fed185e9fed5ec95132f9a204d2f0f558b69320c10f33adfe7eb875e32e9c
description: 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.
---
# lookupErrorCode(insLookupErrorCodeInputRepresentation)

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)

## Parameters

insLookupErrorCodeInputRepresentation

Type: [ConnectApi.InsLookup​Error​Code​InputRepresentation](https://developer.salesforce.com/docs/atlas.en-us.insurance_developer_guide.meta/insurance_developer_guide/apex_connectapi_input_ins_lookup_error_code.htm "Input representation that specifies the insurance error code to look up.")

Required. Input that specifies the insurance error code string to look up.

## Return Value

Type: [ConnectApi.InsLookup​Error​Code​Representation](https://developer.salesforce.com/docs/atlas.en-us.insurance_developer_guide.meta/insurance_developer_guide/apex_connectapi_output_ins_lookup_error_code.htm "Output representation that contains the looked-up error code description, optional cause, resolution instructions, and any request-level errors.")

## Usage

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.

ConnectApi.InsLookupErrorCodeInputRepresentation input =
    new ConnectApi.InsLookupErrorCodeInputRepresentation();
input.errorCode = 'SF-INS-DSAV-00029';

ConnectApi.InsLookupErrorCodeRepresentation result =
    ConnectApi.InsuranceDesignAdvisorFamily.lookupErrorCode(input);

System.debug('errorCode=' + result.errorCode);
System.debug('errorDescription=' + result.errorDescription);
System.debug('errorCause=' + result.errorCause);
System.debug('instructions=' + result.instructions);
System.debug('errors=' + result.errors);