Skip to content
This repository was archived by the owner on Oct 2, 2019. It is now read-only.
This repository was archived by the owner on Oct 2, 2019. It is now read-only.

Webpack::Rails::Manifest.load_dev_server_manifest wildcard exception handler #86

Description

@diclophis

I would like to submit as an issue the fact that the load_dev_server_manifest class method uses a "wildcard" exception handling block ... i.e.

    def load_dev_server_manifest
      host = ::Rails.configuration.webpack.dev_server.manifest_host
      port = ::Rails.configuration.webpack.dev_server.manifest_port
      http = Net::HTTP.new(host, port)
      http.use_ssl = ::Rails.configuration.webpack.dev_server.https
      http.verify_mode = ::Rails.configuration.webpack.dev_server.https_verify_peer ? OpenSSL::SSL::VERIFY_PEER : OpenSSL::SSL::VERIFY_NONE
      http.get(dev_server_path).body
    rescue => e
      raise ManifestLoadError.new("Could not load manifest from webpack-dev-server at http://#{host}:#{port}#{dev_server_path} - is it running, and is stats-webpack-plugin loaded?", e)
    end

This is highly undesirable due to the fact that any exception in an early before_filter gets caught in this handler, and hides the true exception from the developer!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions