HTTPRequest() please give back error message
Posted: Fri May 26, 2023 11:21 am
Hi,
actually (2.40) the HTTPRequest doesn't give back any information why the request failed.
In spider_HTTPRequest() there are three parameters in the $.ajax error:function(a,b,c) defined, but no-one is given back.
Looking in the docs, "b" gives back something like "timeout", "error", "abort" or "parsererror", and "c" gives back text http status like "Not Found" or "Internal Server Error."
For the callback to the SB program it is clear that the request was an error, when the first parameter is 0/#False, so the above error messages shouldn't be a problem when send as the second callback parameter. So maybe something like give back "c" when set, else give back "b"?
In the help it is written "The result of the request, as a text object", and an error message for me would be also a result.
actually (2.40) the HTTPRequest doesn't give back any information why the request failed.
In spider_HTTPRequest() there are three parameters in the $.ajax error:function(a,b,c) defined, but no-one is given back.
Looking in the docs, "b" gives back something like "timeout", "error", "abort" or "parsererror", and "c" gives back text http status like "Not Found" or "Internal Server Error."
For the callback to the SB program it is clear that the request was an error, when the first parameter is 0/#False, so the above error messages shouldn't be a problem when send as the second callback parameter. So maybe something like give back "c" when set, else give back "b"?
In the help it is written "The result of the request, as a text object", and an error message for me would be also a result.