You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// TODO: Can I bubble up a specific message as to why
50
+
Current.Logger.Warn<HubspotWorkflow>("Workflow {WorkflowName}: No API key has been set for the Hubspot workflow for the form {FormName} ({FormId})",Workflow.Name,e.Form.Name,e.Form.Id);
Current.Logger.Warn<HubspotWorkflow>("Workflow {WorkflowName}: Missing Hubspot field mappings for workflow for the form {FormName} ({FormId})",Workflow.Name,e.Form.Name,e.Form.Id);
59
+
returnWorkflowExecutionStatus.NotConfigured;
60
+
}
61
+
62
+
// Map data from the workflow setting Hubspot fields
63
+
// From the form field values submitted for this form submission
Current.Logger.Warn<HubspotWorkflow>("Workflow {WorkflowName}: The field mapping with Id, {FieldMappingId}, did not match any record fields. This is probably caused by the record field being marked as sensitive and the workflow has been set not to include sensitive data",Workflow.Name,mapping.FormField);
81
+
}
82
+
}
83
+
84
+
// Serialise dynamic JObject to a string for StringContent to POST to URL
// Depending on POST status fail or mark workflow as completed
93
+
if(postResponse.IsSuccessStatusCode==false)
94
+
{
95
+
// LOG THE ERROR
96
+
Current.Logger.Warn<HubspotWorkflow>("Workflow {WorkflowName}: Error submitting data to Hubspot for the form {FormName} ({FormId})",Workflow.Name,e.Form.Name,e.Form.Id);
97
+
returnWorkflowExecutionStatus.Failed;
98
+
}
99
+
100
+
// TODO:
101
+
// Is it worth logging the success that it got created in HubSpot with its ID etc in response
0 commit comments