]> cat aescling's git repositories - mastodon.git/commit
Fix confusing error when webfinger request returns empty document (#16986)
authorClaire <claire.github-309c@sitedethib.com>
Sun, 14 Nov 2021 20:55:40 +0000 (21:55 +0100)
committerGitHub <noreply@github.com>
Sun, 14 Nov 2021 20:55:40 +0000 (21:55 +0100)
commit3517867b7656ff506a04e394fc8c1a855b7d504a
tree60a068a415e4b6c12fb17208ebc2f46c0ea05994
parent4b616c4f0a2158883034cd756391bd70265b787d
Fix confusing error when webfinger request returns empty document (#16986)

For some reason, some misconfigured servers return an empty document when
queried over webfinger. Since an empty document does not lead to a parse
error, the error is not caught properly and triggers uncaught exceptions
later on.

This PR fixes that by immediately erroring out with `Webfinger::Error` on
getting an empty response.
app/lib/webfinger.rb