Update produce_test.js

currently the producer was throwing "error undefined" with each message sent to kafka. code was edited to log errors only if error is defined.