5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-06-02 08:04:17 +00:00

fix: fix exception in platforms_answer method #13903
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed

This commit is contained in:
jazzari 2023-08-16 13:39:29 -03:00
parent 5ac628b38a
commit 35dca9d756

View file

@ -57,7 +57,7 @@ module Api
new_signature = 'sha256=' + OpenSSL::HMAC.hexdigest(OpenSSL::Digest.new('sha256'), token, payload)
ActiveSupport::SecurityUtils.secure_compare(new_signature, signature)
end.tap do |t|
raise ActiveRecord::RecordNotFound if t.nil?
raise ActiveRecord::RecordNotFound, 'token no encontrado' if t.nil?
end
end
@ -67,12 +67,9 @@ module Api
end
# respuesta de error a plataformas
def platforms_answer
def platforms_answer(exception)
head :forbidden
raise ArgumentError, 'token no encontrado'
rescue ArgumentError => e
ExceptionNotifier.notify_exception(e, data: { params: params.to_h })
end
ExceptionNotifier.notify_exception(exception, data: { params: params.to_h })
end
end
end