More generously catch errors on userlookup

Okay so, userlookup stuff hasn't worked in years, because it requires a login now.

But apparently, somewhere recently, the code inside our `neopets` gem started hard crashing, because of assumptions we made about the document we'd get back.

I'm not sure why it only recently started crashing? or if I'm even necessarily right about that?

But anyway, I'm just doing the easiest safest (🤞🏻) change possible: being more generous with the errors we swallow.

Test Plan:
Deploy and cross fingers.
This commit is contained in:
Matt Dunn-Rankin 2019-10-27 14:24:21 -07:00
parent c7d60e3e41
commit 6697b15413

View file

@ -109,7 +109,7 @@ class PetState < ActiveRecord::Base
self.female = user_pet.female?
self.mood_id = user_pet.mood.id
self.labeled = true
rescue Neopets::User::Error
rescue
# If there's an error loading the userlookup data (e.g. account is
# frozen), no big deal; we just won't label the pet right now. Proceed
# as usual.