Parsing problem

Issue #4 resolved
Krzysztof Kocel created an issue

We have Stash 2.7.2 and using plugin causes such stacktrace:

Password: ***************************
c:/Ruby200/lib/ruby/2.0.0/json/common.rb:155:in `initialize': A JSON text must at least contain two octets! (JSON::ParserError)
        from c:/Ruby200/lib/ruby/2.0.0/json/common.rb:155:in `new'
        from c:/Ruby200/lib/ruby/2.0.0/json/common.rb:155:in `parse'
        from c:/Ruby200/lib/ruby/gems/2.0.0/gems/atlassian-stash-0.1.6/lib/atlassian/stash/pullrequest.rb:91:in `create_pull_request'
        from c:/Ruby200/lib/ruby/gems/2.0.0/gems/atlassian-stash-0.1.6/bin/stash:83:in `block (3 levels) in <top (required)>'
        from c:/Ruby200/lib/ruby/gems/2.0.0/gems/atlassian-stash-0.1.6/lib/atlassian/stash/git.rb:25:in `ensure_within_git!'
        from c:/Ruby200/lib/ruby/gems/2.0.0/gems/atlassian-stash-0.1.6/bin/stash:81:in `block (2 levels) in <top (required)>'
        from c:/Ruby200/lib/ruby/gems/2.0.0/gems/commander-4.1.4/lib/commander/command.rb:180:in `call'
        from c:/Ruby200/lib/ruby/gems/2.0.0/gems/commander-4.1.4/lib/commander/command.rb:180:in `call'
        from c:/Ruby200/lib/ruby/gems/2.0.0/gems/commander-4.1.4/lib/commander/command.rb:155:in `run'
        from c:/Ruby200/lib/ruby/gems/2.0.0/gems/commander-4.1.4/lib/commander/runner.rb:402:in `run_active_command'
        from c:/Ruby200/lib/ruby/gems/2.0.0/gems/commander-4.1.4/lib/commander/runner.rb:78:in `run!'
        from c:/Ruby200/lib/ruby/gems/2.0.0/gems/commander-4.1.4/lib/commander/delegates.rb:7:in `run!'
        from c:/Ruby200/lib/ruby/gems/2.0.0/gems/commander-4.1.4/lib/commander/import.rb:10:in `block in <top (required)>'

Comments (2)

  1. Seb Ruiz Account Deactivated

    This means that the response json object is nil.

    Can you please check that your configuration file is correct, or run stash configure to re initialise.

    If you manage to solve the problem, let me know what the mis-configuration was so I can add better error handling around this case.

  2. Log in to comment