[fix] Pass in the correct `err` object

ref: https://github.com/primus/primus/pull/329#discussion_r22321842