Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Error handling for Custom Column with web.contents(API), fails when returns error 404

I have a long list of company VAT numbers, then i create a new custom column with formula:

 

Csv.Document(Web.Contents("https://blahblahblah/" & [CustomerVAT]))

 

It shows data for many company VAT's but in some instances it throws a 404 error, and then the entire query fails with error 

 

DataSource.Error: Web.Contents failed to get contents from https://blahblahblah/ (404)

  • Anonymous's avatar
    Anonymous
    3 years ago

    i managed to solve it by adding a step in powerquery to remove the errors. 

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    i managed to solve it by adding a step in powerquery to remove the errors.