Module: Nucleus::Adapters::V1::Heroku::SemanticErrors

Included in:
Nucleus::Adapters::V1::Heroku
Defined in:
lib/nucleus/adapters/v1/heroku/semantic_errors.rb

Overview

Semantic error messages that are specific for Heroku

Instance Method Summary collapse

Instance Method Details

#semantic_error_messagesHash<Symbol,Hash<Symbol,String>>

Get all Heroku specific semantic error definitions.

Returns:

  • (Hash<Symbol,Hash<Symbol,String>>)

    the error message definitions, including the error code, e.g. 422_200_1 and the message that shall be formatted when used.



10
11
12
13
14
15
16
17
18
# File 'lib/nucleus/adapters/v1/heroku/semantic_errors.rb', line 10

def semantic_error_messages
  {
    need_verification: { code: 422_100_1,
                         message: 'Heroku requires a billing account to allow this action: %s' },
    no_autoscale: { code: 422_100_2, message: 'Can\'t use \'autoscale\' on Heroku' },
    invalid_runtime: { code: 422_100_3,
                       message: 'Invalid runtime: %s is neither a known runtime, nor a buildpack URL' }
  }
end