Action - HTTP Request work not correct

Post your questions and help other users.

Moderator: Martin

Post Reply
Posts: 4
Joined: 06 Feb 2020 15:23

Action - HTTP Request work not correct

Post by KVN » 10 Feb 2020 13:23

1. I read Description this action on Help read Here "The action terminates with a status_code of -1 for general errors . It will terminate with an error when not even a connection to the server can be established (network not available, IP can not be resolved etc.). Use an Exception-connection to handle such errors."

2. I test status_code -1 two way

The firts way is - do the domain does not exist for example the flow result me Null

The second way - do off wi-fi, off mobile internet, the flow reault me Null

Attach Screenshot of flow
Screenshot_20200210-160642.png (94.34 KiB) Viewed 3440 times

User avatar
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: Action - HTTP Request work not correct

Post by Desmanto » 11 Feb 2020 18:49

I usually just handle any error by outputting some simple error message, never try to get the status_code. As I understand, the status_code only have value if the http request is connected properly to the url, but return any kind of the error. Example 404, 403 or 200 in the OK situation. It seems general error refer to any other error that is not handled by the server.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

Post Reply