Forum Discussion

Cobra77's avatar
Cobra77
Post Patron
8 years ago
Solved

How manage an error with invoke custom function who call API

Hi,

 

How manage an error with invoke custom function who call API ?

 

I call an Google API to find lat and lgn.

sample :

(adresse as text)=>
let
    Source = Json.Document(Web.Contents("https://maps.googleapis.com/maps/api/geocode/json?address="&adresse&"&key=mykey")),    etc ....

 

Add column who invoke custom funtion on a other column  : City

 

if it s PARIS or LONDON its ok , but if in my table column city it s PARIS CEDEX 05, i ve error :

Expression.Error: There weren't enough elements in the enumeration to complete the operation.

 

And not possible to refresh.

 

Thanks for your help