Fix sending wrong `ex` if error thrown in send.js