TwitterAPI.UtilController: fix dialyzer errors

lib/pleroma/web/twitter_api/controllers/util_controller.ex:300:pattern_match
The pattern can never match the type.

Pattern:
{:error, :no_such_alias}

Type:
{:not_found, nil}

lib/pleroma/web/twitter_api/controllers/util_controller.ex:304:pattern_match
The pattern can never match the type.

Pattern:
{:error, _error}

Type:
{:not_found, nil}
This commit is contained in:
Mark Felder 2024-01-26 17:21:48 -05:00
parent a24322fcce
commit 28af5e3bd7

View file

@ -319,7 +319,7 @@ defmodule Pleroma.Web.TwitterAPI.UtilController do
user = User.get_cached_by_nickname(nickname)
if user == nil do
{:not_found, nil}
{:error, :not_found}
else
{:ok, user}
end