Skip to main content

Version: 21.05 (EOL)

Form Error

The Form Error command records information about an unexpected JavaScript error in the application, storing this information in the TM Error Log for operational support. Error Log records include the JavaScript stack trace and any context information specified by the application. These Error Log records are associated with the submission record enabling analysis of application specific errors.

The TM server limits the number of errors recorded per transaction to a maximum of 10 to ensure error logging does not impact system performance.

Support

Form Error was introduced in Transact Manager 18.05, and continues to be available in later Journey Maestro releases.

Options

All options are optional unless otherwise indicated.

OptionDescription
stacktracestring

Required. A JavaScript stack trace, with new line ('\n') delimiters.

contextstring

Application state or other information to help understand the context of the error.

Format this context information as a comma separated list of values which TM will display as separate line items in the Error Log view.

Example

{
"type": "formError",
"requestKey": "5cf14e061074b15672e88806f5f71b15",
"options": {
"context": "sectionName=Applicant Details,fieldName=applicant_telephone",
"stacktrace": "Error: Buck stops here.\nat failInlined (http://localhost:8000/error_object/:16:11)\nat catchError (http://localhost:8000/util.js:77:26)\nat http://localhost:8000/error_object/:49:1"
}
}

This example includes the following stack trace information.

Error: Buck stops here.
at failInlined (http://localhost:8000/error_object/:16:11)
at catchError (http://localhost:8000/util.js:77:26)
at http://localhost:8000/error_object/:49:1

The example also includes context information which is formatted in the TM Error Log display as shown below.

sectionName: ApplicantDetails
fieldName: applicant_telephone

Response

info

The response to this command is based on the standard Open UX API HTTP response. For more information, see HTTP Response.

200 OK

On a successful response, the server returns a JSON message specifying the form status.

{
"formStatus": "Opened"
}

400 Bad Request

On an invalid response, the server sends a JSON error message.