Developer forum

Forum » Integration » Failing end point call does not fail job

Failing end point call does not fail job

Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

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

 


Replies

 
Matthias Sebastian Sort Dynamicweb Employee
Matthias Sebastian Sort
Reply
This post has been marked as an answer

Hi Imar,

Well spottet :)

I have now made some changes so it stops the job instead of just logging it into the logfile (and the typo thing).

Not sure when it will be released, but maybe today :)

BR

Matthias Sort

Votes for this answer: 1
 
Kristian Kirkholt Dynamicweb Employee
Kristian Kirkholt
Reply

Hi Imar

The issue in the OData Provider now fixed and released in Dynamicweb version 9.16.4

Get this version from the download section: https://doc.dynamicweb.dk/downloads/dynamicweb-9

Thanks for reporting this

Kind Regards
Kristian Kirkholt
 

 

You must be logged in to post in the forum