How to ignore Web.Contents error on Power Query RRS feed

  • Question

  • How to ignore Web.Contents methos error on Power Query function ?

    Web.Contents make auth error on my Urls, sometime.
    I want to ignore auth error, and skip.

    Currently Power Query confirm collect auth information of web site, and cannot ignore.

    Yoshihiro Kawabata

    Wednesday, September 4, 2013 6:56 AM


All replies

  • Hi Yoshihiro,

    Are you trying to:

    1. Ignore the error and display whatever is on the webpage anyway
    2. Ignore the error and continue to run the mashup differently

    #1 is not supported, #2 can be done by wrapping with a try otherwise.


    Monday, September 9, 2013 5:21 PM
  • I try #1, #2.

    For example:
     2 site error in 1,000 site.
     2 site error reasons is maintenace, and set BASIC Auth mode for only administrator.
     I want Power Query ignore 2 site, and get 998 site Web.Contents. 


    Monday, September 9, 2013 10:20 PM
  • Hi Yoshihiro,

    Do you get top-level errors or error in some cells? (i.e. if you're using Web.Contents([URL]) as a custom column, where URL is another column in the table.

    If you get the errors at cell level, then you can use "Table.RemoveRowsWithErrors" library function to exclude the rows with errors in those columns.


    Tuesday, September 10, 2013 5:52 PM
  • Hi Migue,

    Dialog "Access Web Content" appear at Web.Contents([URL]),
    which [URL] need to BASIC Auth.
    I want to skip the URL without dialog.

    Yoshihiro Kawabata.

    Tuesday, September 10, 2013 11:03 PM
  • Is this still an issue?


    Ed Price, SQL Server Customer Program Manager (Blog, Small Basic, Wiki Ninjas, Wiki)

    Answer an interesting question? Create a wiki article about it!

    Wednesday, September 18, 2013 8:38 PM
  • No issue.

    Yoshihiro Kawabata
    Wednesday, September 18, 2013 10:38 PM
  • Um, yes, I have this issue.  I am calling a SOAP web service with Web.Contents, and if the input data is not correct, the web service returns a 500 error, ALONG WITH an error message in the response. How do I access the response, since PQ seems to do nothing if it gets an HTTP 500 error? This is a showstopper for an otherwise successful SOAP web service calling mechanism...


    - Rand

    Rand Wrobel, Consultant

    Tuesday, July 21, 2015 4:52 PM
  • I'll try to write a sample tomorrow, but this can be done by using the ManualStatusHandling option on Web.Contents to say that you want to manually handle error 500. You will then get back the body of the error.
    Wednesday, July 22, 2015 3:16 AM
  • Can this be done from Power query?

    I am trying the following for digest authntification:

    Source = Web.Contents(URL, [Headers=[Authorization="Digest username=""USERNAME"", realm=""REALM"", nonce=""NOUNCE"", uri=""URI"", qop=auth, nc=, cnonce="""", response=""RESPONSE"", opaque="""""],
    ResponseMeta = Value.Metadata(Source),
    ResponseStatus = ResponseMeta[Response.Status]

    However, the ResponseStatus is null instead of HTTP 401 code I has expecting. I would like to be able to get the nounce and response values from the response header.

    Also: I am looking into creating a custom data connector to solve my issue. The following is posted in the for the DataConnectors docs on GitHub: "Note: Extensions are able to use the ManualStatusHandling option with status codes 401 and 403, which is not something that can be done in Web.Contents calls made outside of an extension context (i.e. directly from Power Query)."

    Can I achieve the digest authentication using power query or by creating a custom data connector?

    • Edited by SFBloo Tuesday, October 31, 2017 7:03 PM
    Tuesday, October 31, 2017 6:54 PM