Forum Discussion
mhilzendegen
3 years agoRegular Visitor
error handling of 404
Hi, Pipedrive sadly started permadeleting deals, so my loop through the deals to grab the products behind the deals now fails with a 404. I am really bad with "otherwise". Anyone see what I have ...
BA_Pete
Super User
3 years agoHi mhilzendegen ,
The correct syntax is 'try...otherwise'. It looks like you are attempting to apply 'each...otherwise' syntax, which doesn't exist.
I think you may be aiming for something like this:
#"Added Custom" =
Table.AddColumn(
#"Changed Type",
"Custom",
each try
Json.Document(Web.Contents("https://digainfo.pipedrive.com/v1/deals/"&[Column1]&"/products:(id,deal_id,product_id,item_price,sum,currency,add_time,comments,name,quantity)?api_token=xyz",[Query=[api_token="xyz", limit="500", start="0"]]))
otherwise 0
),
Pete
mhilzendegen
3 years agoRegular Visitor
Hi Pete, sorry, I tried that too. Also gives me the not in dictionary error
Whatever that is.
Error Message: The given key was not present in the dictionary.