modules/pua: do not override send_publish return value at error
(cherry picked from commit 0ac4c8e579214a75b102f2f1c6877dffb2db8597)