B4J Question Empty ErrorMessage after httpjob

wimpie3

Well-Known Member
Licensed User
Longtime User
Has anyone ever seen this behavior: a httpjob which fails with an empty error message? Works fine under Windows, fails under Linux.

This is the contents of the http job after the call:

[jobname=, success=false, username=
, password=, errormessage=, target=class b4j.example.main
, taskid=1, req=anywheresoftware.b4h.okhttp.OkHttpClientWrapper$OkHttpRequest@114a4c0, response=anywheresoftware.b4h.okhttp.OkHttpClientWrapper$OkHttpResponse@12b5695
, tag=java.lang.Object@46293d, invalidurl=[URL]https://invalid-url/[/URL], defaultscheme=https
, main=null, httputils2service=null]

This seems to suggest the url is invalid (which is not the case).
 
The information is not enough.
what version of the linux and java are you using?
what webserver did you access?
 
Upvote 0
I've found the reason. When the statuscode is 403, ResponseError is empty. I think it's due to the 403 that the okhttp request fails, but it's not really an error so ResponseError stays empty. Hmmm...

Also, when there is no body returned, you get an error (java.lang.RuntimeException: java.lang.RuntimeException: java.io.FileNotFoundException: /tmp/1 )
 
Upvote 0
Back
Top