Skip to content

Commit 9b587cf

Browse files
committed
fix error handling on prep jid failure
this wasn't propagating to localclient as expected; error stacks can't be wrapped in enc/load envelope.
1 parent fc9c7d4 commit 9b587cf

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

salt/master.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2474,8 +2474,12 @@ async def publish(self, clear_load):
24742474
},
24752475
}
24762476
jid = self._prep_jid(clear_load, extra)
2477-
if jid is None:
2478-
return {"enc": "clear", "load": {"error": "Master failed to assign jid"}}
2477+
if jid is None or isinstance(jid, dict):
2478+
if "error" in jid:
2479+
load = jid
2480+
else:
2481+
load = {"error": "Master failed to assign jid"}
2482+
return load
24792483
payload = self._prep_pub(minions, jid, clear_load, extra, missing)
24802484

24812485
if self.opts.get("order_masters"):

0 commit comments

Comments
 (0)