500 Error requesting JSON format of tree: NoMethodError: BlobEntity missing attribute `readable_text?' on #<Gitlab::Git::Tree:0x00007f0f3587c3c8>

Seen in https://gitlab.com/rmaher84/nodeserverv2/tree/master/node_modules/socket.io?format=json.

https://sentry.gitlab.net/gitlab/gitlabcom/issues/590396/

NoMethodError: BlobEntity missing attribute `readable_text?' on #<Gitlab::Git::Tree:0x00007f0f3587c3c8>
  grape_entity/exposure/base.rb:57:in `valid?'
    is_delegatable || raise(NoMethodError, "#{entity.class.name} missing attribute `#{@attribute}' on #{entity.object}")
  grape_entity/exposure/base.rb:82:in `valid_value'
    value(entity, options) if valid?(entity)
  grape_entity/exposure/base.rb:66:in `serializable_value'
    partial_output = valid_value(entity, options)
  grape_entity/exposure/nesting_exposure.rb:41:in `block in serializable_value'
    exposure.serializable_value(entity, nested_options)
  grape_entity/exposure/nesting_exposure.rb:120:in `block (2 levels) in map_entity_exposures'
    result = yield(exposure, new_options)
...
(158 additional frame(s) were not displayed)

NoMethodError: BlobEntity missing attribute `readable_text?' on #<Gitlab::Git::Tree:0x00007f0f3587c3c8>
Assignee Loading
Time tracking Loading