add err log

This commit is contained in:
Sinh 2022-08-30 15:55:20 +07:00
parent e89273aa70
commit 01c28e1ee3
1 changed files with 5 additions and 1 deletions

View File

@ -18,7 +18,11 @@ func (sv Server) Request(subject string, payload []byte) (*nats.Msg, error) {
if sv.Config.RequestTimeout > 0 { if sv.Config.RequestTimeout > 0 {
timeout = sv.Config.RequestTimeout timeout = sv.Config.RequestTimeout
} }
return sv.instance.Request(subject, payload, timeout) msg, err := sv.instance.Request(subject, payload, timeout)
if errors.Is(err, nats.ErrNoResponders) {
log.Printf("[NATS SERVER]: request - no responders for subject: %s", subject)
}
return msg, err
} }
// Reply ... // Reply ...