   assetRequest = request options, (error, response, body='') ->
     if error? or response.statusCode >= 400
       logError('Upload release asset failed', error, body)
-      callback(error ? response.statusCode)
+      callback(error ? new Error(response.statusCode))
     else
       callback(null, release)
 

    request options, (error, response, body='') ->
      if error? or response.statusCode isnt 204
        logError('Deleting existing release asset failed', error, body)
        callback(error ? response.statusCode)
      else
        callback()


    request options, (error, response, release={}) ->
      if error? or response.statusCode isnt 201
        logError('Creating release failed', error, release)
        callback(error ? new Error(response.statusCode))
      else
        callback(null, release)

