http.query should handle ConnectionRefusedError exception more nicely #67543
Replies: 5 comments
-
|
Okay @flassman thanks for bring this up. |
Beta Was this translation helpful? Give feedback.
-
|
@cmcmarrow I believe this should be labeled as a bug. This may be debatable though depending on expected behavior. In some scenarios, the user may be restarting a service and then using this to check for the service to be back online as a final step. While a service is restarting the client may receive a "connection refused" error causing the state to terminate execution early and fail. |
Beta Was this translation helpful? Give feedback.
-
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue. |
Beta Was this translation helpful? Give feedback.
-
|
I assume the issue has been fixed in the 2018.3 branch with #53394 |
Beta Was this translation helpful? Give feedback.
-
|
Thank you for updating this issue. It is no longer marked as stale. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Description of Issue
If you call the http.query against a web server which is down, you get the following stacktrace instead of a simple error message:
I would expect that the exception is handled and an error is returned, like in other places, for example if you run file.managed with a source which does not exist:
Setup
I ran the following state, but the URL was not reachable because the server was down:
Steps to Reproduce Issue
put the above state in some sls file then call it with state.apply
Versions Report
Salt server:
Salt minion:
Beta Was this translation helpful? Give feedback.
All reactions