docker-stack 2.0.3__py3-none-any.whl → 2.0.4__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -110,7 +110,16 @@ class ManagerApiClient:
110
110
  with urllib.request.urlopen(request, timeout=self.timeout_secs, context=context) as response:
111
111
  return json.loads(response.read().decode("utf-8"))
112
112
  except urllib.error.HTTPError as exc:
113
- raise RuntimeError(f"Manager request failed ({method} {path}): HTTP {exc.code}") from exc
113
+ body = ""
114
+ try:
115
+ payload = exc.read().decode("utf-8", errors="replace").strip()
116
+ if payload:
117
+ body = f": {payload}"
118
+ except Exception:
119
+ body = ""
120
+ raise RuntimeError(
121
+ f"Manager request failed ({method} {path}): HTTP {exc.code}{body}"
122
+ ) from exc
114
123
  except urllib.error.URLError as exc:
115
124
  raise RuntimeError(f"Manager request failed ({method} {path}): {exc.reason}") from exc
116
125
  except json.JSONDecodeError as exc:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: docker-stack
3
- Version: 2.0.3
3
+ Version: 2.0.4
4
4
  Summary: CLI for deploying and managing Docker stacks.
5
5
  Home-page: https://github.com/mesudip/docker-stack
6
6
  Author: Sudip Bhattarai
@@ -7,13 +7,13 @@ docker_stack/envsubst.py,sha256=gdEUpsjWJeNbbahySk56vUdQh1nns85o3LbU6SUBo3I,8337
7
7
  docker_stack/envsubst_merge.py,sha256=TwOu8BducG0rWnSreJGwesNi-VghCetljcf-aWceE8M,4971
8
8
  docker_stack/helpers.py,sha256=7zQT_lYU6IcqjSOYjE0JlHRtbB8Sffz3XlJKyNvot6U,5580
9
9
  docker_stack/login.py,sha256=_4sx0hltvKnwA81r_HyYkdQjXs5AEPlh_Qy87sUfcP0,30996
10
- docker_stack/manager_api.py,sha256=RIIu6LURXWB15FbEouj3R6ln8zeDaiABM1J7rdNFQj0,12925
10
+ docker_stack/manager_api.py,sha256=NsSuXV7b5CiBDOz5EqqDWE4xwzaXNoqldrsd2oKAziw,13205
11
11
  docker_stack/markers.py,sha256=gqStnr0tNWZ1kzqvREc2jVQVQrevheShgJtL5QzSx4g,2388
12
12
  docker_stack/merge_conf.py,sha256=Pmsabcgf3SDyaWvf2OLsBPodzEqsvOIjj9xzn_qWXH0,1917
13
13
  docker_stack/registry.py,sha256=sWC1J9JDIrcYyhei1POYCZHJ0xUCKC2pveisSHMgYsQ,9036
14
14
  docker_stack/url_parser.py,sha256=Sk8GQE0nEiwCkijp1OltP2AfgtKEmM2hybcH_rBhfiI,6824
15
- docker_stack-2.0.3.dist-info/METADATA,sha256=Jp1HVzvGuktr82GtfR54oTm9qd1FEIuPWAz_tEWx4ak,8753
16
- docker_stack-2.0.3.dist-info/WHEEL,sha256=SmOxYU7pzNKBqASvQJ7DjX3XGUF92lrGhMb3R6_iiqI,91
17
- docker_stack-2.0.3.dist-info/entry_points.txt,sha256=mpe2RwIguARsosXIUBQEN2pKU53URqZCh2S4ATwDFL4,55
18
- docker_stack-2.0.3.dist-info/top_level.txt,sha256=zT6TPL54cLrt9LO_MNkhEpGGOmsoe2HV6Na5Ohy3_2c,13
19
- docker_stack-2.0.3.dist-info/RECORD,,
15
+ docker_stack-2.0.4.dist-info/METADATA,sha256=FIag9JDv5WzZ6yOH1AurLdAnKHOcHZO-YFSl_r6YN5g,8753
16
+ docker_stack-2.0.4.dist-info/WHEEL,sha256=SmOxYU7pzNKBqASvQJ7DjX3XGUF92lrGhMb3R6_iiqI,91
17
+ docker_stack-2.0.4.dist-info/entry_points.txt,sha256=mpe2RwIguARsosXIUBQEN2pKU53URqZCh2S4ATwDFL4,55
18
+ docker_stack-2.0.4.dist-info/top_level.txt,sha256=zT6TPL54cLrt9LO_MNkhEpGGOmsoe2HV6Na5Ohy3_2c,13
19
+ docker_stack-2.0.4.dist-info/RECORD,,