Error Handling
During data synchronizing, a SyncErrorHandle logic intercepts any failures, captures the error details, and updates the corresponding record with that information.
Error Handling Sample Code
moduleName = "{YOUR_MODULE_NAME}"
if inputs is not None and inputs['document'] is not None and inputs['document']['payload'] is not None:
doc = Module(moduleName).find({ 'Dynamic.Extension.{fieldName}': inputs['document']['payload']['docNo'] })
if doc is not None:
form = Module(moduleName).execute('sync', doc)
form['Error'] = True
form['Error Message'] = inputs['error']
debug("result",form)
Module(moduleName).submit(doc, form)
Last updated