Forum Discussion

ChristopheB's avatar
ChristopheB
Frequent Visitor
2 years ago

Power Query check validity URL via Web.Contents fails

Hi,

I have a column [URL] with a list of urls. I want to add an extra column that checks whether the URL is valid or not. I know that certain urls return a 400 error, but I can't seem to get an error to point that out.

 

This is the code I use:

= Table.AddColumn(#"Waarde vervangen", "status", each if [URL] ="" then "" else try Web.Contents([URL],[ManualStatusHandling={400,404}]))

 

(I tried with and without the option 'ManualStatusHandling', but with the same result.)

 

Any ideas or other ways to check whether the URL still works?

1 Reply