mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-16 19:36:22 +00:00
fix: fix exception in platforms_answer method #13903
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
This commit is contained in:
parent
5ac628b38a
commit
35dca9d756
1 changed files with 3 additions and 6 deletions
|
@ -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
|
Loading…
Reference in a new issue