         promise.done (response) =>
           for name, file of response.files
             notebook.handle_file @, file, options
-        promise.fail (response, status_text, error) =>
-          @fns.error status_text
+        promise.fail (response) =>
+          @fns.error response.statusText
 
   cmd 'save_gist', 'Saves a notebook as a gist', ->
     notebook = @export_notebook()

        site = settings.get 'githubs', github.default()
        build_url site, gist
      else
        uri = URI gist
        site = github.get_github uri

        if github?
          [id, rest...] = uri.filename().split '.'


  github =
    context_fns: context_fns
    get_github: (url) ->
      uri = URI url
      hostname = uri.hostname()
      if hostname == 'gist.github.com' or hostname == 'api.github.com'
        host = 'github.com'
