/
Error Codes

Error Codes

The following error codes may be observed across all Send2CRM components. They are returned to the website client, which will log to the browser console. It will also provide them in the send2crmFormSubmit custom event to allow further handling.

In some cases the request may both succeed and return an error code; for example mappings configured for soft failure. Error objects generally contain both an error property with the code, and an accompanying boolean isSuccess property.

Additional codes may be added to the lists below from time to time.

Client-side errors

These occur in the website client prior to making a request to the Send2CRM service.

Code

Description

Code

Description

FRM_MINTIME

Minimum time before form submission has not passed.

FRM_NO_FIELDS

No valid form fields present.

FRM_NO_IDENTIFIER

No valid form identifier found.

FRM_NO_SERVICE

Send2CRM service not found.

FRM_RATE

Maximum form submission rate has been exceeded.

FRM_RECAPTCHA

Client-side reCAPTCHA validation failed.

FRM_VALIDATION

Custom validation prevented form submission.

Internal service errors

Configuration and general errors that occur during Send2CRM processing.

Code

Description

Code

Description

INT_CONTENTTYPE

Unexpected or invalid Content-Type in service response.

INT_FORM_SAVE_ERROR

Unspecified record save failure.

INT_FORM_VALIDATION

Mapping validator prevented form submission.

INT_MAPPING_CONDITIONS

Mapping conditions not met.

INT_MAPPING_OBJECT_INVALID

Configured mapping object or identification object is invalid.

INT_MAPPING_RESULT_NORECORD

Mapping configuration results in no record to create or update.

INT_NO_IDENTIFIER

Visitor update received without valid identifier.

INT_SCALER_CACHED_ERROR

Scaling service returned error based on previous cached response.

INT_SCALER_EMPTY_RESPONSE

Empty response from service due to bad request.

INT_CLOSE_TO_LIMIT

Partial processing was cut short due to server limits; particularly Salesforce Apex CPU limit.

Native exceptions

The Salesforce service, and to a lesser extent the Scaling service, may encounter exceptions native to that platform which result in a failed response. For security reasons the specific error messages are not exposed, however the exception class name is transformed into an error code to aid in troubleshooting when reviewing the applicable logs.

The error code format is EX_<EXCEPTION_CLASS_PREFIX>. For example a Salesforce NullPointerException would generate the error code EX_NULL_POINTER, or the .Net InvalidOperationException would generate EX_INVALID_OPERATION.

Exception special case: Salesforce DML status

In the case of DMLException and EmailException, Salesforce provides an additional StatusCode that is used instead of the exception class name to provide a more specific error.

For example attempting to insert a record without a value for a required field will result in a DMLException with REQUIRED_FIELD_MISSING status code. Send2CRM will return the code EX_REQUIRED_FIELD_MISSING.

HTTP status errors

In some instances the cause of the error is unknown or is not exposed for security reasons, generic HTTP status codes may be returned.

Code

Description

Code

Description

HTTP_BAD_REQUEST

400: invalid data sent to service.

HTTP_UNAUTHORIZED

401: missing or invalid API key or malformed authentication.

HTTP_PAYLOAD_TOO_LARGE

413: request too large for service to process, usually files.

HTTP_SERVER_ERROR

500: unexpected error.

Related content