Skip to content

Commit

Permalink
catch typo in instance name; sort errors
Browse files Browse the repository at this point in the history
  • Loading branch information
pushcx committed Feb 22, 2024
1 parent 8aac4a3 commit f43752f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app/models/mastodon_app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,12 @@ def register_app!
return save!
end
errors.add :base, "Mastodon instance didn't return a client_id and client_secret"
rescue OpenSSL::SSL::SSLError
errors.add :base, "#{name} isn't a working SSL server"
rescue JSON::ParserError
errors.add :base, "#{name} responded with non-parseable JSON"
rescue NoIPsError
errors.add :base, "#{name} isn't resolving to an IP"
rescue OpenSSL::SSL::SSLError
errors.add :base, "#{name} isn't a working SSL server"
end

def token_and_user_from_code(code)
Expand Down

0 comments on commit f43752f

Please sign in to comment.