Uploaded image for project: 'Red Hat 3scale API Management'
  1. Red Hat 3scale API Management
  2. THREESCALE-2524

crash when user specify directory to import

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor Minor
    • None
    • 2.5.1
    • Toolbox
    • None

      I've try to import directory as OpenApiSpec v2 by mistake and Toolbox crashes with error message:
      ```
      Errno::EISDIR: Is a directory @ io_fread - ./OpenAPI-Specification/examples/v2.0/json/petstore-separate

      ===== BACKTRACE:

      /usr/share/3scale_toolbox-0.7.0/lib/3scale_toolbox/commands/import_command/openapi/resource_reader.rb:35:in `read'
      /usr/share/3scale_toolbox-0.7.0/lib/3scale_toolbox/commands/import_command/openapi/resource_reader.rb:35:in `read_file'
      /usr/share/3scale_toolbox-0.7.0/lib/3scale_toolbox/commands/import_command/openapi/resource_reader.rb:30:in `call'
      /usr/share/3scale_toolbox-0.7.0/lib/3scale_toolbox/commands/import_command/openapi/resource_reader.rb:30:in `read_content'
      /usr/share/3scale_toolbox-0.7.0/lib/3scale_toolbox/commands/import_command/openapi/resource_reader.rb:15:in `load_resource'
      /usr/share/3scale_toolbox-0.7.0/lib/3scale_toolbox/commands/import_command/openapi.rb:37:in `run'
      /usr/share/3scale_toolbox-0.7.0/vendor/bundle/ruby/2.5.0/gems/cri-2.15.3/lib/cri/command_runner.rb:34:in `call'
      /usr/share/3scale_toolbox-0.7.0/vendor/bundle/ruby/2.5.0/gems/cri-2.15.3/lib/cri/command_dsl.rb:303:in `block in runner'
      /usr/share/3scale_toolbox-0.7.0/vendor/bundle/ruby/2.5.0/gems/cri-2.15.3/lib/cri/command.rb:359:in `run_this'
      /usr/share/3scale_toolbox-0.7.0/vendor/bundle/ruby/2.5.0/gems/cri-2.15.3/lib/cri/command.rb:296:in `run'
      /usr/share/3scale_toolbox-0.7.0/vendor/bundle/ruby/2.5.0/gems/cri-2.15.3/lib/cri/command.rb:314:in `run'
      /usr/share/3scale_toolbox-0.7.0/vendor/bundle/ruby/2.5.0/gems/cri-2.15.3/lib/cri/command.rb:314:in `run'
      /usr/share/3scale_toolbox-0.7.0/lib/3scale_toolbox/cli.rb:39:in `block in run'
      /usr/share/3scale_toolbox-0.7.0/lib/3scale_toolbox/cli/error_handler.rb:7:in `block in error_watchdog'
      /usr/share/3scale_toolbox-0.7.0/lib/3scale_toolbox/cli/error_handler.rb:13:in `error_watchdog'
      /usr/share/3scale_toolbox-0.7.0/lib/3scale_toolbox/cli/error_handler.rb:7:in `error_watchdog'
      /usr/share/3scale_toolbox-0.7.0/lib/3scale_toolbox/cli.rb:36:in `run'
      /usr/share/3scale_toolbox-0.7.0/exe/3scale:15:in `<top (required)>'
      /usr/share/3scale_toolbox-0.7.0/bin/3scale:29:in `load'
      /usr/share/3scale_toolbox-0.7.0/bin/3scale:29:in `<main>'
      ```

              Unassigned Unassigned
              mkudlej@redhat.com Martin Kudlej
              Eguzki Astiz Lezaun Eguzki Astiz Lezaun
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: