heroku / platform-api

Ruby HTTP client for the Heroku API
MIT License
213 stars 86 forks source link

Failure (404) PlatformAPI::Addon#info_by_app() #91

Closed beatak closed 5 years ago

beatak commented 5 years ago

I ran a script last night by the scheduler and it seems to have failed. I didn't have a clue how it failed, so I ran it in from console again.

> require 'platform-api'
> heroku = PlatformAPI.connect_oauth("__api_key__")
> heroku.addon.info_by_app("app-name", "addon-name")
Excon::Errors::NotFound: Expected([200, 201, 202, 204, 206, 304]) <=> Actual(404 Not Found)

  from /ruby-2.4.5@web/gems/excon-0.45.4/lib/excon/middlewares/expects.rb:6:in `response_call'
  from /ruby-2.4.5@web/gems/excon-0.45.4/lib/excon/middlewares/response_parser.rb:8:in `response_call'
  from /ruby-2.4.5@web/gems/excon-0.45.4/lib/excon/connection.rb:372:in `response'
  from /ruby-2.4.5@web/gems/excon-0.45.4/lib/excon/connection.rb:236:in `request'
  from /ruby-2.4.5@web/gems/heroics-0.0.24/lib/heroics/link.rb:111:in `request_with_cache'
  from /ruby-2.4.5@web/gems/heroics-0.0.24/lib/heroics/link.rb:66:in `run'
  from /ruby-2.4.5@web/gems/heroics-0.0.24/lib/heroics/resource.rb:28:in `method_missing'
  from /ruby-2.4.5@web/gems/platform-api-2.1.0/lib/platform-api/client.rb:918:in `info_by_app'

By looking at the API doc ( http://heroku.github.io/platform-api/PlatformAPI/Addon.html#info_by_app-instance_method ), it seems the API itself still exists. Additionally, I have tried a few times from the console and got the same result.

Is this deprecated? Or am I doing something wrong? I asked this on help.heroku.com and their account rep pointed me here. Thanks!

beatak commented 5 years ago

Well, I guess this is now solved. thanks?

beatak commented 5 years ago

This happens again.

beatak commented 5 years ago

ah, sorry never mind this was my bad.