Errors and Exceptions

Sometimes the Socotra API will not be able to complete the requested operation and throw an exception. In this case an ExceptionResponse will be returned instead of the requested object. Also, some normal response objects include error information as indicated below.

Error Responses

ExceptionResponse
required
apiErrorCode integer
httpErrorCode integer
httpStatus integer

optional
claimFieldErrors ClaimFieldErrors
commit string
fieldErrors [ValidationFieldError]
message string
paymentFieldErrors FieldErrors
policyFieldErrors PolicyValidationErrors
referenceId string
requestMethod string
requestUri string
throwable string
version string

Note

The fields commit, referenceId, and throwable are used internally by the Socotra support team to diagnose problems. If you are working with support on a problem, retain information from these fields to help the resolution of the issue.

Note

See the Error Codes section below for information about the apiErrorCode property.

ValidationFieldError
required
code integer
ontologyUri string
validatorUri string

optional
debug string
message string
FieldErrors
required
fieldGroupErrors [FieldGroupErrors]
hasErrors boolean

optional
errorMessage string
FieldGroupErrors
required
fieldName string

optional
locator string
index integer
ValidationFieldError2
required
fieldName string
code string MISSING | INVALID_FIELD | INVALID_TYPE | INVALID_VALUE

optional
message string
CancellationValidationError
required
name string
code string MISSING | INVALID_FIELD | INVALID_TYPE | INVALID_VALUE

optional
message string
PolicyValidationErrors
required
cancellationValidationErrors [CancellationValidationError]
exposureValidationErrors [ExposureValidationErrors]
hasErrors boolean

optional
policyFieldErrors FieldErrors
ExposureValidationErrors
required
exposureName string
hasErrors boolean
perilValidationErrors [PerilValidationErrors]

optional
exposureFieldErrors FieldErrors
exposureLocator string
index integer
message string
PerilValidationErrors
required
name string
hasErrors boolean

optional
fieldErrors FieldErrors
message string
ClaimFieldErrors
optional
fieldErrors FieldErrors
subClaimErrors SubClaimValidationErrors
SubClaimValidationErrors
required
locator string
errors FieldErrors

API Error Codes

The following codes will be returned when the corresponding errors occur. They will be found in the apiErrorCode property of the error response.

The code returned will be a number. Refer to this page for the meaning of the code.

Warning

Avoid basing integration code on any text in an error message. Instead, use the numerical code as listed here for your integration logic. The numerical codes here will not be changed but text may change in the future.

Note

Not all API errors are guaranteed to include an apiErrorCode, and will instead return 0. If you require a code for a particular scenario, Contact your account representative.

Conflicts

100001: INVALID_POLICY_LOCATOR

100002: CANNOT_FINALIZE_ISSUED_POLICY

100003: CANNOT_FINALIZE_POLICY_WITH_QUOTE

100004: CANNOT_DISCARD_ISSUED_POLICY

100005: CANNOT_DISCARD_POLICY_WITH_ACCEPTED_QUOTE

100006: FINALIZED_POLICY_WITH_QUOTE_INCORRECT_STATE

100007: CANNOT_UPDATE_POLICY_QUOTE_NOT_IN_DRAFT

100008: CANNOT_UPDATE_POLICY_QUOTE_ALREADY_ISSUED

100009: CANNOT_ISSUE_POLICY_WITH_ISSUED_TIMESTAMP

100010: CANNOT_ISSUE_ISSUED_POLICY

100011: CANNOT_ISSUE_POLICY_WITHOUT_ACCEPTABLE_QUOTE

100012: CANNOT_ISSUE_POLICY_UW_RULES_DECLINE

100013: CANNOT_ISSUE_POLICY_UW_NOT_ACCEPTED

100014: PREMIUM_REPORTING_INVALID_ACTION_IN_DISCARD

100015: PREMIUM_REPORTING_INVALID_ACTION_REVERSE

100016: PREMIUM_REPORTING_INVALID_ACTION_REVISE

100017: PREMIUM_REPORTING_INVALID_ACTION_IN_ISSUED

100018: CANNOT_ISSUE_PREMIUM_REPORTING_NON_ISSUED_POLICY

100019: PREMIUM_REPORTING_END_TIME_LESS_THAN_POLICY_START_TIME

100020: PREMIUM_REPORTING_END_TIME_LESS_THAN_LAST_REPORT_START_TIME

100021: PREMIUM_REPORTING_CANNOT_SPAN_POLICY_BOUNDARY

100022: PREMIUM_REPORTING_FAILED_VALIDATION_FIELDS

100023: PREMIUM_REPORTING_CALCULATION_ERROR

100024: PREMIUM_REPORTING_GENERIC_ERROR

Bad Requests

200001: CANNOT_UPDATE_FINALIZED_POLICY

200002: CLAIMS_V3_IS_NOT_ENABLED

200003: PREMIUM_REPORTING_IS_NOT_ENABLED

200004: CANNOT_ISSUE_LAPSED_POLICY

200005: CANCELLATION_TIME_DOES_NOT_APPLY_TO_ANY_PERIL_CHARACTERISTICS

Forbidden

300001: CANNOT_CREATE_CLAIM_FOR_UNISSUED_POLICY

Precondition Failed

400001: CANNOT_CANCEL_NOT_ISSUED_POLICY