I have an API defined that looks like the following image (complete definition not shown).
The following is the call to that API in a JS query
await apiUpdateProfile.trigger({ additionalScope: {
varStatus: data.EditStatus ?? data.Status,
varAddress: data.EditAddress,
varCity: data.EditCity,
varState: data.EditState,
varZip: data.EditZip,
varStreet: null,
varIsMailStreet: data.EditIsMailStreet,
varMailAddress: data.EditMailAddress,
varMailCity: data.EditMailCity,
varMailState: data.EditMailState,
varMailZip: data.EditMailZip,
varCounty: data.EditCounty,
varLocation: data.EditLocation,
varSize: data.EditSize,
varBuildingType: data.EditBuildingType,
varIsBuildingOwner: data.EditIsBuildingOwner,
varSic: data.EditSIC,
varSalesVolume: data.EditSalesVolume,
varIsIntlBusiness: null,
varSizeAllSites: data.EditSizeAllSites,
varSizeExact: data.EditSizeExact,
varNoOfSites: data.EditNoOfSites,
varIsFaxIsPhone: null,
varIsOptedOut: null,
varIsOverride: bool2Char(data.EditAddressOverride),
varIsMailOverride: bool2Char(data.EditMailAddressOverride),
varAddressValidation: data.EditAddressValidation,
varMailAddressValidation: data.EditMailAddressValidation,
varAddressType: null,
varSuiteStatus: null,
varMsa: null,
varLatitude: data.EditLatitude,
varLongitude: data.EditLongitude,
varFollowUpDate: null,
varEnteredById: ResearchStatus.data.UpdatedBy[0],
varEnteredDate: s2n(ResearchStatus.data.Updated[0]),
varBuildingNo: data.EditBuildingNo,
varStartYear: data.EditStartYear,
varStreetNo: null,
varSuiteNo: data.EditSuiteNo,
varZipPlus: data.EditZipPlus,
varMailBuildingNo: data.EditMailBuildingNo,
varMailSuiteNo: data.EditMailSuiteNo,
varMailZipPlus: data.EditMailZipPlus,
varPropertyId: data.EditPropertyId,
varNaics: null,
varAreaCode: data.EditAreaCode,
varPhoneNo: data.EditPhoneNo,
varPhone2AreaCode: data.EditPhone2AreaCode,
varPhone2PhoneNo: data.EditPhone2PhoneNo,
varFaxAreaCode: null,
varFaxPhoneNo: null,
varTollFreeAreaCode: data.EditTollFreeAreaCode,
varTollFreePhoneNo: data.EditTollFreePhoneNo,
varWebsite: data.EditWebsite,
varEmail: data.EditEmail,
varIsContacts: null,
varIsRelationship: null,
varIsOfficeLease: null,
varIsNotes: null,
varIsTagLists: null,
varIsResearch: null,
varSqFt: data.EditSqFt,
varIsEstimated: null,
varIsMonthToMonthLease: data.EditIsMonthToMonthLease,
varMoveDate: data.EditMoveDate,
varLeaseBeginMonth: data.EditLeaseBeginMonth,
varLeaseBeginYear: data.EditLeaseBeginYear,
varLeaseEndMonth: data.EditLeaseEndMonth,
varLeaseEndYear: data.EditLeaseEndYear,
varTeamUrl: null,
varLicompanyUrl: null
},
onFailure: function(error) {
stPostSuccess.setValue(false);
qryShowAlert.trigger({additionalScope : {varMessage: "Failed to update profile, the post was terminated.\n\nReturned error: " +
apiUpdateProfile.data.message}});
}
});
When I pull the JSON being sent to the API from 'state' it is as follows. You will notice that there are quite a few missing fields.
{
"DirMarketId": 0,
"Street": null,
"IsIntlBusiness": null,
"IsFaxIsPhone": null,
"IsOptedOut": null,
"IsOverride": null,
"IsMailOverride": null,
"AddressType": null,
"SuiteStatus": null,
"Msa": null,
"FollowUpDate": null,
"EnteredById": 501,
"EnteredDate": "2023-12-15T16:06:24.739Z",
"StreetNo": null,
"Naics": null,
"FaxAreaCode": null,
"FaxPhoneNo": null,
"IsContacts": null,
"IsRelationship": null,
"IsOfficeLease": null,
"IsNotes": null,
"IsTagLists": null,
"IsResearch": null,
"IsEstimated": null,
"TeamUrl": null,
"LicompanyUrl": null,
"BaseDate": null,
"DirCompanyId": 200535990,
"DirCompany": {
"DirCompanyId": 200535990,
"Name": "Company Name Here "
},
"ExtendedData": {
"delSuite": false,
"delBuildingNo": false,
"delMailSuite": false,
"delMailBuildingNo": false,
"delWebSite": false,
"delEmail": false,
"delMonthlyLease": false,
"delLeaseBegin": false,
"delLeaseEnd": false,
"delSIC": false,
"RelationshipParent": null,
"EditCorpHQ": null,
"EditCorpAddress": null,
"EditAffiliateOf": null,
"EditAffiliateAddress": null,
"delCorpHQ": false,
"delCorpAffilateOf": false,
"EditHqRelationshipParent": null,
"EditAfflRelationshipParent": null,
"ReviewedById": 501,
"ReviewedDate": "2023-12-15T16:06:24.743Z",
"BatchId": 32046,
"HasChanges": true
}
}
The API call errors because the JSON declaration is incomplete as expected. However, the onFailure doesn't fire. This all worked last week. In fact, the onFailure was firing earlier today, but it just stopped. I have cleared out everything and restarted a session. No change.
What can you tell me?