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
requiredapiErrorCode integerhttpErrorCode integerhttpStatus integeroptionalclaimFieldErrors ClaimFieldErrorscommit stringfieldErrors [ValidationFieldError]message stringpaymentFieldErrors FieldErrorspolicyFieldErrors PolicyValidationErrorsreferenceId stringrequestMethod stringrequestUri stringthrowable stringversion 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.
requiredcode integerontologyUri stringvalidatorUri stringoptionaldebug stringmessage string
requirederrors [ValidationFieldError2]fieldGroupErrors [FieldGroupErrors]hasErrors booleanoptionalerrorMessage string
requiredfieldName stringerrors [ValidationFieldError2]optionallocator stringindex integer
requiredfieldName stringcode string MISSING | INVALID_FIELD | INVALID_TYPE | INVALID_VALUEoptionalmessage string
requiredname stringcode string MISSING | INVALID_FIELD | INVALID_TYPE | INVALID_VALUEoptionalmessage string
requiredcancellationValidationErrors [CancellationValidationError]exposureValidationErrors [ExposureValidationErrors]hasErrors booleanoptionalpolicyFieldErrors FieldErrors
requiredexposureName stringhasErrors booleanperilValidationErrors [PerilValidationErrors]optionalexposureFieldErrors FieldErrorsexposureLocator stringindex integermessage string
requiredname stringhasErrors booleanoptionalfieldErrors FieldErrorsmessage string
optionalfieldErrors FieldErrorssubClaimErrors SubClaimValidationErrors
requiredlocator stringerrors 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