Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

A list of DownloadData typical reponses for each HTTP response status code

seven
12 - Quasar

I'm using the Download tool and I received a 401 unauthorised error code. The DownloadData field is empty. I would love to see a list of expected values for Download Data for each error code. Here is the list of error codes:

https://developer.mozilla.org/en-US/docs/Web/HTTP/Status

 

For my use case, I want to know beforehand which codes will have an empty response and which won't.

1 REPLY 1
danilang
19 - Altair
19 - Altair

Hi @seven 

 

The answer is "It depends on how the server is coded"  In general 200 level responses will return a result in download data.  400 and 500 responses won't.  In general...most of the time.   Some 200 responses can have no download data, especially if they are responses to PUT requests.  You can simply get a 200 response in the download header with no download data.  Some 400 responses can return additional information about the error in the download data field, but it's not required. 

 

Your best option is to always parse the download headers and check for the class.   If it's a success message (2xx) use the DownloadData if you expect it to be there.  If it's one of the error message 4xx and 5x, assume that the DownloadData field does not contain useful data, though it might contain useful information about the error 

 

Dan 

Labels