Hi there,
I have an OData job that fails because of a missing shipping agent code. However, the job completed successfully so we never received an email from the notification system that something was wrong. Here's an excerpt from the job log:
2023-11-21 11:05:10.171: Starting OData export.
2023-11-21 11:05:10.171: Begin synchronizing 'EcomOrders' to 'SalesOrder'.
2023-11-21 11:05:11.346: HttpRestClient: 'https://SomeUrl/SalesOrder?$filter=External_Document_No+eq+%27WO172750%27' invoked with GET
2023-11-21 11:05:11.513: Recieved response from Endpoint = [Snip]
2023-11-21 11:05:11.513: HttpRestClient: 'https://SomeUrl/SalesOrder(Document_Type='Order',No='1650')' invoked with PATCH and '{ "External_Document_No": "WO172750", "PaymentTransactionNo": "4244964", "Shipping_Agent_Code": "DHL", "Shipping_Agent_Service_Code": "DHLP_P", "Shipment_Method_Code": ""'
2023-11-21 11:05:11.804: Endpoint error: {"error":{"code":"Internal_InvalidTableRelation","message":"The field Shipping Agent Service Code of table Sales Header contains a value (DHLP_P) that cannot be found in the related table (Shipping Agent Services).
2023-11-21 11:05:11.804: Error Url: https://SomeUrl/SalesOrder(Document_Type='Order',No='1650'). Response Error: {"error":{"code":"Internal_InvalidTableRelation","message":"The field Shipping Agent Service Code of table Sales Header contains a value (DHLP_P) that cannot be found in the related table (Shipping Agent Services). CorrelationId: 886bb95d-a980-4c50-b1be-0e0cd26415e6."}}. Status response code: NotFound
2023-11-21 11:05:11.804: Recieved response from Endpoint =
2023-11-21 11:05:11.804: End synchronizing 'EcomOrders' to 'SalesOrder'.
2023-11-21 11:05:11.804: Finished OData export.
2023-11-21 11:05:11.814: Job succeeded.
An error occurs somewhere in the middle of the logs, but in the end the job is still marked as completed.
Can this be fixed so the job fails properly and email notifications are sent?
And while you're there, maybe also fix the typo in the logs? Recieved => Received :-)
Thanks!
Imar