У меня есть следующий метод, который выбрасывает ошибку в заголовке. Я знаю, что это происходит, если метод является рекурсивным, если он вызывает его. Но мой метод вызывается не сам по себе. Кто-нибудь знает, почему я получаю эту ошибку?
def self.send_my_message
sqs = Aws::SQS::Client.new(region: 'us-east-2')
queue_name = "something"
queue_url = sqs.get_queue_url(queue_name: queue_name).queue_url
sqs.send_message(queue_url: queue_url, message_body: 'Hello world')
end
Ошибки трассировки полного стека:
Response:
{
"errorMessage": "stack level too deep",
"errorType": "Function<SystemStackError>",
"stackTrace": [
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:152:in `initialize_dup'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:152:in `dup'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:152:in `block in as_json'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:152:in `map'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:152:in `as_json'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:134:in `as_json'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:152:in `block in as_json'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:152:in `map'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:152:in `as_json'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:134:in `as_json'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:152:in `block in as_json'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:152:in `map'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:152:in `as_json'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:134:in `as_json'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:152:in `block in as_json'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:152:in `map'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:152:in `as_json'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:134:in `as_json'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:152:in `block in as_json'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:152:in `map'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:152:in `as_json'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:134:in `as_json'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:152:in `block in as_json'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:152:in `map'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:152:in `as_json'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:134:in `as_json'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:152:in `block in as_json'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:152:in `map'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:152:in `as_json'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:134:in `as_json'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:152:in `block in as_json'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:152:in `map'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:152:in `as_json'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:134:in `as_json'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:152:in `block in as_json'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:152:in `map'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:152:in `as_json'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:134:in `as_json'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:152:in `block in as_json'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:152:in `map'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:152:in `as_json'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:134:in `as_json'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:152:in `block in as_json'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:152:in `map'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:152:in `as_json'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:134:in `as_json'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:152:in `block in as_json'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:152:in `map'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:152:in `as_json'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:134:in `as_json'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:152:in `block in as_json'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:152:in `map'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:152:in `as_json'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:134:in `as_json'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:152:in `block in as_json'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:152:in `map'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:152:in `as_json'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:134:in `as_json'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:152:in `block in as_json'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:152:in `map'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:152:in `as_json'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:134:in `as_json'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:152:in `block in as_json'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:152:in `map'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:152:in `as_json'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:134:in `as_json'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:152:in `block in as_json'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:152:in `map'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:152:in `as_json'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:134:in `as_json'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:152:in `block in as_json'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:152:in `map'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:152:in `as_json'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:134:in `as_json'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:152:in `block in as_json'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:152:in `map'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:152:in `as_json'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:134:in `as_json'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:152:in `block in as_json'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:152:in `map'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:152:in `as_json'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:134:in `as_json'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:152:in `block in as_json'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:152:in `map'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:152:in `as_json'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:134:in `as_json'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:152:in `block in as_json'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:152:in `map'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:152:in `as_json'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:134:in `as_json'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:152:in `block in as_json'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:152:in `map'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:152:in `as_json'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:134:in `as_json'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:152:in `block in as_json'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:152:in `map'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:152:in `as_json'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:134:in `as_json'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:152:in `block in as_json'",
"/opt/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/core_ext/object/json.rb:152:in `map'"
]
}