Gush issue

Issue #19 closed
Luis Cordova created an issue

I am getting an error with gush i create that sends a create request

~ gush i:create -vvv Luiss-MacBook-Pro-3 [23:43:43] Issue title: test

[Gush\Exception\AdapterException] No message found, raw content:

Exception trace: () at /Users/cordoval/Sites/gush/vendor/gushphp/gush-bitbucket-adapter/src/Listener/ErrorListener.php:57 Gush\Adapter\Listener\ErrorListener->postSend() at n/a:n/a call_user_func_array() at /Users/cordoval/Sites/gush/vendor/gentle/bitbucket-api/lib/Bitbucket/API/Http/Client.php:370 Bitbucket\API\Http\Client->Bitbucket\API\Http{closure}() at n/a:n/a array_walk_recursive() at /Users/cordoval/Sites/gush/vendor/gentle/bitbucket-api/lib/Bitbucket/API/Http/Client.php:373 Bitbucket\API\Http\Client->executeListeners() at /Users/cordoval/Sites/gush/vendor/gentle/bitbucket-api/lib/Bitbucket/API/Http/Client.php:202 Bitbucket\API\Http\Client->request() at /Users/cordoval/Sites/gush/vendor/gentle/bitbucket-api/lib/Bitbucket/API/Http/Client.php:151 Bitbucket\API\Http\Client->post() at /Users/cordoval/Sites/gush/vendor/gentle/bitbucket-api/lib/Bitbucket/API/Api.php:149 Bitbucket\API\Api->requestPost() at /Users/cordoval/Sites/gush/vendor/gentle/bitbucket-api/lib/Bitbucket/API/Repositories/Issues.php:99 Bitbucket\API\Repositories\Issues->create() at /Users/cordoval/Sites/gush/vendor/gushphp/gush-bitbucket-adapter/src/BitbucketIssueTracker.php:54 Gush\Adapter\BitbucketIssueTracker->openIssue() at /Users/cordoval/Sites/gush/src/Command/Issue/IssueCreateCommand.php:78 Gush\Command\Issue\IssueCreateCommand->execute() at /Users/cordoval/Sites/gush/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:252 Symfony\Component\Console\Command\Command->run() at /Users/cordoval/Sites/gush/vendor/symfony/console/Symfony/Component/Console/Application.php:894 Symfony\Component\Console\Application->doRunCommand() at /Users/cordoval/Sites/gush/src/Application.php:260 Gush\Application->doRunCommand() at /Users/cordoval/Sites/gush/vendor/symfony/console/Symfony/Component/Console/Application.php:193 Symfony\Component\Console\Application->doRun() at /Users/cordoval/Sites/gush/vendor/symfony/console/Symfony/Component/Console/Application.php:124 Symfony\Component\Console\Application->run() at /Users/cordoval/Sites/gush/bin/gush:101

issue:create [--issue_title="..."] [--issue_body="..."] [-o|--org="..."] [-r|--repo="..."]

Comments (8)

  1. Sebastiaan Stok

    This is an unresolved issue (no pun) with the content-type. https://bitbucket.org/gentlero/bitbucket-api/pull-request/6/fix-pullrequests-merge-and-decline/diff

    @vimishor can you take care of this? Or do you want me to open a PR to resolve the problems with the missing Content-Type.

    A simpler approach is to detect if the Content-Type is not 'application/json' in the OAuthListener and then include the value for signing. Rather then checking if the Content-Type is 'application/x-www-form-urlencoded' which must be always given then (which is currently not the case).

    Or in the Api define content-type for post/put when it is not set.

  2. Log in to comment