logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://hacktivis.me/git/pleroma.git
commit: b52d772a6e66b13bac875b7289de3bd63c087db3
parent 5915062874f0697beb51bd80eabafb6cfa34d362
Author: Mark Felder <feld@feld.me>
Date:   Fri,  7 Jun 2024 16:03:10 -0400

Add some useful logging for ApiSpec errors

Diffstat:

Mlib/pleroma/web/api_spec/cast_and_validate.ex6++++++
1 file changed, 6 insertions(+), 0 deletions(-)

diff --git a/lib/pleroma/web/api_spec/cast_and_validate.ex b/lib/pleroma/web/api_spec/cast_and_validate.ex @@ -18,6 +18,8 @@ defmodule Pleroma.Web.ApiSpec.CastAndValidate do alias OpenApiSpex.Plug.PutApiSpec alias Plug.Conn + require Logger + @impl Plug def init(opts) do opts @@ -51,6 +53,10 @@ defmodule Pleroma.Web.ApiSpec.CastAndValidate do conn {:error, reason} -> + Logger.error( + "Strict ApiSpec: request denied to #{conn.path_info} with params #{inspect(conn.params)}" + ) + opts = render_error.init(reason) conn