NoMethodError: undefined method 'each' for #<String:0x00007f527b3edf58> in ResponseLogger
Seems like response
is a String in error cases ?
/cc @alexpooley
https://sentry.gitlab.net/gitlab/gitlabcom/issues/4086378/?referrer=gitlab_plugin
Rack::Timeout::RequestTimeoutException: Request ran for longer than 60000ms
app/models/concerns/packages/installable.rb:13:in `block (2 levels) in <module:Installable>'
scope :installable, -> { with_status(const_get(:INSTALLABLE_STATUSES, false)) }
app/models/packages/package.rb:38:in `block in <class:Package>'
has_many :installable_package_files, -> { installable }, class_name: 'Packages::PackageFile', inverse_of: :package
app/presenters/packages/npm/package_presenter.rb:29:in `block (2 levels) in versions'
package_file = package.installable_package_files.last
app/presenters/packages/npm/package_presenter.rb:28:in `block in versions'
batched_packages.each do |package|
app/models/concerns/each_batch.rb:99:in `block (2 levels) in each_batch'
unscoped { yield relation, index }
...
(225 additional frame(s) were not displayed)
NoMethodError: undefined method `preferred_language' for #<Rack::Response:0x00007f527b3ee520>
lib/api/helpers.rb:79:in `current_user'
Gitlab::I18n.locale = @current_user&.preferred_language
lib/api/helpers.rb:542:in `handle_api_exception'
Gitlab::ApplicationContext.push(user: current_user, remote_ip: request.ip)
lib/api/api.rb:147:in `block in <class:API>'
handle_api_exception(exception)
lib/gitlab/metrics/elasticsearch_rack_middleware.rb:16:in `call'
@app.call(env)
lib/gitlab/middleware/memory_report.rb:13:in `call'
return @app.call(env) unless rendering_memory_profiler?(request)
...
(134 additional frame(s) were not displayed)
NoMethodError: undefined method `each' for #<String:0x00007f527b3edf58>
lib/gitlab/grape_logging/loggers/response_logger.rb:11:in `parameters'
response.each { |resp| response_bytes += resp.to_s.bytesize }
lib/gitlab/metrics/elasticsearch_rack_middleware.rb:16:in `call'
@app.call(env)
lib/gitlab/middleware/memory_report.rb:13:in `call'
return @app.call(env) unless rendering_memory_profiler?(request)
lib/gitlab/middleware/speedscope.rb:13:in `call'
return @app.call(env) unless rendering_flamegraph?(request)
lib/gitlab/database/load_balancing/rack_middleware.rb:23:in `call'
result = @app.call(env)
...
(134 additional frame(s) were not displayed)
Edited by Thong Kuah