From 28af5e3bd7073980465c1f6c1b2f6019c4a45e4f Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Fri, 26 Jan 2024 17:21:48 -0500 Subject: [PATCH] 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} --- lib/pleroma/web/twitter_api/controllers/util_controller.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pleroma/web/twitter_api/controllers/util_controller.ex b/lib/pleroma/web/twitter_api/controllers/util_controller.ex index 50f8f803f..c8ecf5eff 100644 --- a/lib/pleroma/web/twitter_api/controllers/util_controller.ex +++ b/lib/pleroma/web/twitter_api/controllers/util_controller.ex @@ -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