1
0
Fork 0
mirror of https://github.com/binwiederhier/ntfy.git synced 2024-09-28 11:22:00 +02:00

Clarify error message for poll requests

This commit is contained in:
binwiederhier 2023-05-23 13:20:43 -04:00
parent 168ad8bf1b
commit da06ae4485

View file

@ -868,7 +868,11 @@ func (s *Server) forwardPollRequest(v *visitor, m *message) {
logvm(v, m).Err(err).Warn("Unable to publish poll request") logvm(v, m).Err(err).Warn("Unable to publish poll request")
return return
} else if response.StatusCode != http.StatusOK { } else if response.StatusCode != http.StatusOK {
logvm(v, m).Err(err).Warn("Unable to publish poll request, unexpected HTTP status: %d", response.StatusCode) if response.StatusCode == http.StatusTooManyRequests {
logvm(v, m).Err(err).Warn("Unable to publish poll request, the upstream server %s responded with HTTP %s; you may solve this by sending fewer daily messages, or by configuring upstream-access-token (assuming you have an account with higher rate limits) ", s.config.UpstreamBaseURL, response.Status)
} else {
logvm(v, m).Err(err).Warn("Unable to publish poll request to %s, the upstream server %s responded with HTTP %s", s.config.UpstreamBaseURL, response.Status)
}
return return
} }
} }