logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://hacktivis.me/git/pleroma.git
commit: 94d7e28cbe36609c94bef1c8e6edd1853659d716
parent 5c08153fc504605ae84a8e69db49a840bf996c1e
Author: Mark Felder <feld@feld.me>
Date:   Sat, 27 Jan 2024 14:29:48 -0500

Pleroma.Web.ActivityPub.ObjectValidator: dialyzer error

lib/pleroma/web/activity_pub/object_validator.ex:165:pattern_match
The pattern can never match the type.

Pattern:
{:local, _}

Type:

  {:error,
   %Ecto.Changeset{
     :action => atom(),
     :changes => %{atom() => _},
     :constraints => [
       %{
         :constraint =>
           binary()
           | %Regex{
               :opts => binary() | [any()],
               :re_pattern => _,
               :re_version => _,
               :source => binary()
             },
         :error_message => binary(),
         :error_type => atom(),
         :field => atom(),
         :match => :exact | :prefix | :suffix,
         :type => :check | :exclusion | :foreign_key | :unique
       }
     ],
     :data => nil | map(),
     :empty_values => _,
     :errors => Keyword.t({binary(), Keyword.t()}),
     :filters => %{atom() => _},
     :params => nil | %{binary() => _},
     :prepare => [(_ -> any())],
     :repo => atom(),
     :repo_opts => Keyword.t(),
     :required => [atom()],
     :types =>
       nil
       | %{
           atom() =>
             atom()
             | {:array | :assoc | :embed | :in | :map | :maybe | :param, _}
             | {:parameterized, atom(), _}
         },
     :valid? => boolean(),
     :validations => Keyword.t()
   }}

Diffstat:

Mlib/pleroma/web/activity_pub/object_validator.ex3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/lib/pleroma/web/activity_pub/object_validator.ex b/lib/pleroma/web/activity_pub/object_validator.ex @@ -173,6 +173,9 @@ defmodule Pleroma.Web.ActivityPub.ObjectValidator do {:object_validation, e} -> e + + {:error, %Ecto.Changeset{} = e} -> + {:error, e} end end