catch HTTPError when updating discord avatar
This commit is contained in:
parent
41177bc37a
commit
58c0cd8983
@ -77,6 +77,8 @@ class APIUser < ApplicationRecord
|
|||||||
avatar.attach(io: image, filename: "#{hash}.webp")
|
avatar.attach(io: image, filename: "#{hash}.webp")
|
||||||
update!(last_avatar_hash: hash)
|
update!(last_avatar_hash: hash)
|
||||||
true
|
true
|
||||||
|
rescue OpenURI::HTTPError => e
|
||||||
|
Rails.logger.warn(e)
|
||||||
end
|
end
|
||||||
|
|
||||||
def can_create_apikey?
|
def can_create_apikey?
|
||||||
|
Loading…
Reference in New Issue
Block a user