diff --git a/src/invidious/routes/api/v1/authentication.cr b/src/invidious/routes/api/v1/authentication.cr index fc407181..e452475c 100644 --- a/src/invidious/routes/api/v1/authentication.cr +++ b/src/invidious/routes/api/v1/authentication.cr @@ -10,7 +10,7 @@ module Invidious::Routes::API::V1::Authentication creds = nil begin creds = Credentials.from_json(body_json) - rescue + rescue JSON::SerializableError end # get user info if creds @@ -42,11 +42,10 @@ module Invidious::Routes::API::V1::Authentication # send captcha if enabled if CONFIG.captcha_enabled captcha_response = nil - captcha_response = CaptchaResponse.from_json(body_json) - # begin - # rescue ex - - # end + begin + captcha_response = CaptchaResponse.from_json(body_json) + rescue JSON::SerializableError + end if captcha_response answer = captcha_response.answer tokens = captcha_response.tokens