Quantcast
Channel: Nintex Connect: Unanswered Threads
Viewing all articles
Browse latest Browse all 2462

Web Request GET returns error instead of 404

$
0
0

I wrote workflow to monitor the status of a number of websites. The workflow runs against a list of URLs. It uses a Web Request action to perform a GET on a URL and then records the HTTP status and other metrics.

The workflow works great so long as the web server returns a status in the 200 - 300 range. I've noticed that if it runs against a page that doesn't exist on a web site, the workflow errors out instead of returning the expected 404 error.

For instance if it checks a URL like http://www.google.com/thisisnotarealpage, the workflow errors with a huge message that includes all the HTML for the 404 page. For example...

Error performing web request. <!DOCTYPE html>
<html lang=en>
  <meta charset=utf-8>
  <meta name=viewport content="initial-scale=1, minimum-scale=1, width=device-width">
  <title>Error 404 (Not Found) .....

Is it supposed to work this way? If so, how would you trap HTTP result codes in the 400+ range?

Thanks!


Viewing all articles
Browse latest Browse all 2462

Trending Articles