       catch error
         switch error
           when 'BLACKLIST'
-            ret.code = 418
-            ret.status = 'I\'m a teapot'
+            ret['message'] = 'I\'m a teapot'
           else
-            ret.code = 500
-            ret.status = error
+            ret['message'] = error
         WARN('%s (%s)', error, ip)
         if not self.mute && self.last_blacklist_uid != uid
           nodeirc.action("\u000306#{uid}\u000314 is trying to report #{target_uid} \u000304(#{error})")

      res.send(JSON.stringify(ret))

    self.routes['POST']['/metadata'] = (req, res) ->
      res.setHeader 'Content-Type', 'text/javascript; charset=utf-8'
      ret =
        code: 200
        status: 'OK'
        data: []

      params = url.parse(req.url, true).query
      ip = get_client_remote_address(req)
      callback = params.callback
      title = req.body.title
      artist = req.body.artist
      tags = req.body.tags
      authorized = self.secret_key && self.secret_key == req.body.secret_key

      try
        throw 'Permission_denied' if not authorized
        self.metadata =
          title: title
          artist: artist
          tags: tags
        self.metadata_updated = true
      catch error
        ret.code = 403
        ret.status = error
        WARN('%s (%s)', error, ip)

      res.send(jsonp_stringify(ret, callback))

  initializeServer: =>
    self = this


    self.routes['GET']['/report'] = (req, res) ->
      res.setHeader('Content-Type', 'text/javascript; charset=utf-8')
      ret = {}

      params = url.parse(req.url, true).query
      timestamp = (new Date()).getTime()
