5apps / liquor-cabinet

remoteStorage HTTP API, based on Sinatra
MIT License
40 stars 6 forks source link

NoMethodError: undefined method `/' for nil:NilClass #135

Closed raucao closed 4 years ago

raucao commented 4 years ago

https://sentry.io/organizations/5apps/issues/1426307576/?referrer=github_plugin

NoMethodError: undefined method `/' for nil:NilClass
  lib/remote_storage/rest_provider.rb:503:in `block in get_directory_listing_from_redis_via_lua'
    v["Last-Modified"] = Time.at(v["Last-Modified"]/1000).httpdate
  lib/remote_storage/rest_provider.rb:502:in `each'
    items.reject{|k, _| k.end_with? "/"}.each do |_, v|
  lib/remote_storage/rest_provider.rb:502:in `get_directory_listing_from_redis_via_lua'
    items.reject{|k, _| k.end_with? "/"}.each do |_, v|
  lib/remote_storage/rest_provider.rb:102:in `get_directory_listing'
    items = get_directory_listing_from_redis_via_lua(user, directory)
...
(38 additional frame(s) were not displayed)
raucao commented 4 years ago

Continuation of #128.

I can reproduce this on staging now. But we don't have the old events anymore to see if it's just the staging Redis DB that may be inconsistent.

raucao commented 4 years ago

Closing again, after we fixed the faulty data. There's nothing to fix about the code here.