Skip to content

Better error when process type does not exist (and in general on excon errors) #153

@schneems

Description

@schneems
  1) This buildpack installs node and yarn and calls assets:precompile
     Failure/Error:
       app.run_multi("which node") do |out, status|
         expect(out.strip).to_not be_empty
         expect(status.success?).to be_truthy
       end

     Excon::Error::NotFound:
       Expected([200, 201, 202, 204, 206, 304, 429]) <=> Actual(404 Not Found)
     # /Users/rschneeman/.gem/ruby/2.7.2/gems/excon-0.78.0/lib/excon/middlewares/expects.rb:13:in `response_call'
     # /Users/rschneeman/.gem/ruby/2.7.2/gems/excon-0.78.0/lib/excon/middlewares/response_parser.rb:12:in `response_call'
     # /Users/rschneeman/.gem/ruby/2.7.2/gems/excon-0.78.0/lib/excon/connection.rb:456:in `response'
     # /Users/rschneeman/.gem/ruby/2.7.2/gems/excon-0.78.0/lib/excon/connection.rb:287:in `request'
     # /Users/rschneeman/.gem/ruby/2.7.2/gems/heroics-0.1.1/lib/heroics/link.rb:118:in `block in request_with_cache'
     # /Users/rschneeman/.gem/ruby/2.7.2/gems/rate_throttle_client-0.1.2/lib/rate_throttle_client/clients/exponential_increase_proportional_remaining_decrease.rb:17:in `call'

This is caused because there is no web process type on this app. We should include the path and the error message in the output:

$ heroku api PATCH /apps/hatchet-t-f1811bf539/formation/web --body '{"size": "Standard-1X"}'
PATCH api.heroku.com/apps/hatchet-t-f1811bf539/formation/web... 404
 ›   Error: Couldn't find that process type (web).
 ›
 ›   Error ID: not_found

This comes from the platform api which uses heroics

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions