Skip to content

Error 500 loading discussions.json: NoMethodError: undefined method `to_h' for "":String

https://sentry.gitlap.com/gitlab/gitlabcom/issues/271536/

NoMethodError: undefined method `to_h' for "":String
Did you mean?  to_d
               to_f
               to_i
               to_s
               to_r
               to_c
  api/entities.rb:733:in `block in <class:Note>'
    note.position.to_h
  grape_entity/entity.rb:494:in `instance_exec'
    instance_exec(object, &block)
  grape_entity/entity.rb:494:in `exec_with_object'
    instance_exec(object, &block)
  grape_entity/exposure/block_exposure.rb:10:in `value'
    entity.exec_with_object(options, &@block)
  grape_entity/exposure/base.rb:82:in `valid_value'
    value(entity, options) if valid?(entity)
...
(162 additional frame(s) were not displayed)

NoMethodError: undefined method `to_h' for "":String
Did you mean?  to_d
               to_f
               to_i
               to_s
               to_r
               to_c