code: function encodeError(err, header) {
    return Buffer.concat([
      header || new Buffer([0]), // Recover the header if possible.
      new Buffer([1, 0]), // Error flag and first union index.
      STRING_TYPE.toBuffer(err.message)
    ]);
  }
docs: Encode an error and optional header into a valid Avro response.
  
  @param err {Error} Error to encode.
  @param header {Object} Optional response header.