{"action":"created","issue":{"url":"https://api.github.com/repos/heroku/platform-api/issues/50","repository_url":"https://api.github.com/repos/heroku/platform-api","labels_url":"https://api.github.com/repos/heroku/platform-api/issues/50/labels{/name}","comments_url":"https://api.github.com/repos/heroku/platform-api/issues/50/comments","events_url":"https://api.github.com/repos/heroku/platform-api/issues/50/events","html_url":"https://github.com/heroku/platform-api/issues/50","id":167462090,"number":50,"title":"No error details given when response is an HTTP 422","user":{"login":"pirj","id":6916,"avatar_url":"https://avatars.githubusercontent.com/u/6916?v=3","gravatar_id":"","url":"https://api.github.com/users/pirj","html_url":"https://github.com/pirj","followers_url":"https://api.github.com/users/pirj/followers","following_url":"https://api.github.com/users/pirj/following{/other_user}","gists_url":"https://api.github.com/users/pirj/gists{/gist_id}","starred_url":"https://api.github.com/users/pirj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pirj/subscriptions","organizations_url":"https://api.github.com/users/pirj/orgs","repos_url":"https://api.github.com/users/pirj/repos","events_url":"https://api.github.com/users/pirj/events{/privacy}","received_events_url":"https://api.github.com/users/pirj/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"djcp","id":3966,"avatar_url":"https://avatars.githubusercontent.com/u/3966?v=3","gravatar_id":"","url":"https://api.github.com/users/djcp","html_url":"https://github.com/djcp","followers_url":"https://api.github.com/users/djcp/followers","following_url":"https://api.github.com/users/djcp/following{/other_user}","gists_url":"https://api.github.com/users/djcp/gists{/gist_id}","starred_url":"https://api.github.com/users/djcp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/djcp/subscriptions","organizations_url":"https://api.github.com/users/djcp/orgs","repos_url":"https://api.github.com/users/djcp/repos","events_url":"https://api.github.com/users/djcp/events{/privacy}","received_events_url":"https://api.github.com/users/djcp/received_events","type":"User","site_admin":false},"assignees":[{"login":"djcp","id":3966,"avatar_url":"https://avatars.githubusercontent.com/u/3966?v=3","gravatar_id":"","url":"https://api.github.com/users/djcp","html_url":"https://github.com/djcp","followers_url":"https://api.github.com/users/djcp/followers","following_url":"https://api.github.com/users/djcp/following{/other_user}","gists_url":"https://api.github.com/users/djcp/gists{/gist_id}","starred_url":"https://api.github.com/users/djcp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/djcp/subscriptions","organizations_url":"https://api.github.com/users/djcp/orgs","repos_url":"https://api.github.com/users/djcp/repos","events_url":"https://api.github.com/users/djcp/events{/privacy}","received_events_url":"https://api.github.com/users/djcp/received_events","type":"User","site_admin":false}],"milestone":null,"comments":4,"created_at":"2016-07-25T20:49:38Z","updated_at":"2016-08-05T17:45:17Z","closed_at":null,"body":"```\r\nclient.domain.create('my_app', {hostname: \"mydomain.com\"})\r\nExcon::Error::UnprocessableEntity: Expected([200, 201, 202, 204, 206, 304]) <=> Actual(422 Unprocessable Entity)\r\n```\r\n\r\nwith curl:\r\n```\r\ncurl -v -n -X POST https://api.heroku.com/apps/$MY_APP/domains -d '{ \"hostname\": \"mydomain.com\" }' -H \"Content-Type: application/json\" -H \"Authorization: Bearer $HEROKU_API_TOKEN\"\r\n...\r\n< HTTP/1.1 422 status code 422\r\n...\r\n{\r\n  \"id\":\"invalid_params\",\r\n  \"message\":\"mydomain.com is currently in use by another app.\"\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/heroku/platform-api/issues/comments/237915880","html_url":"https://github.com/heroku/platform-api/issues/50#issuecomment-237915880","issue_url":"https://api.github.com/repos/heroku/platform-api/issues/50","id":237915880,"user":{"login":"djcp","id":3966,"avatar_url":"https://avatars.githubusercontent.com/u/3966?v=3","gravatar_id":"","url":"https://api.github.com/users/djcp","html_url":"https://github.com/djcp","followers_url":"https://api.github.com/users/djcp/followers","following_url":"https://api.github.com/users/djcp/following{/other_user}","gists_url":"https://api.github.com/users/djcp/gists{/gist_id}","starred_url":"https://api.github.com/users/djcp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/djcp/subscriptions","organizations_url":"https://api.github.com/users/djcp/orgs","repos_url":"https://api.github.com/users/djcp/repos","events_url":"https://api.github.com/users/djcp/events{/privacy}","received_events_url":"https://api.github.com/users/djcp/received_events","type":"User","site_admin":false},"created_at":"2016-08-05T17:45:17Z","updated_at":"2016-08-05T17:45:17Z","body":"@geemus There are 2 places I could see making this improvement:\r\n\r\n1) in heroics, possibly by rescuing some subset of excon errors and re-raising a heroics specific-error instance, and\r\n2) In excon, though that seems to be so widely used that I'd be loath to modify how it throws errors.\r\n\r\nThoughts? Other ideas?"}}
{"actor":{"display_login":"djcp"}}