Fixed wrong error check (#2986)

Signed-off-by: Matthias Hanel <mh@synadia.com>
This commit is contained in:
Matthias Hanel
2022-03-31 18:03:06 -04:00
committed by GitHub
parent d4e2fde45c
commit 241bf5df0d

View File

@@ -4005,7 +4005,7 @@ func (s *Server) jsClusteredStreamRequest(ci *ClientInfo, acc *Account, subject,
cfg := &ccfg
selectedLimits, tier, _, apiErr := acc.selectLimits(&ccfg)
if err != nil {
if apiErr != nil {
resp.Error = apiErr
s.sendAPIErrResponse(ci, acc, subject, reply, string(rmsg), s.jsonResponse(&resp))
return