Verification follow-up improvements (#5568)
* handle unhandled verification case * log site domain on browserless errors * mix format * info -> warning to see the logs
This commit is contained in:
parent
b76996b3a4
commit
39c006bfb9
|
|
@ -100,11 +100,17 @@ defmodule Plausible.Verification.Checks.Installation do
|
|||
)
|
||||
|
||||
{:ok, %{status: status, body: %{"data" => %{"error" => error}}}} ->
|
||||
Logger.warning("[VERIFICATION] Browserless JS error: #{inspect(error)}")
|
||||
Logger.warning(
|
||||
"[VERIFICATION] Browserless JS error (data_domain='#{data_domain}'): #{inspect(error)}"
|
||||
)
|
||||
|
||||
put_diagnostics(state, plausible_installed?: false, service_error: status)
|
||||
|
||||
{:error, %{reason: reason}} ->
|
||||
Logger.warning("[VERIFICATION] Browserless request error: #{inspect(reason)}")
|
||||
Logger.warning(
|
||||
"[VERIFICATION] Browserless request error (data_domain='#{data_domain}'): #{inspect(reason)}"
|
||||
)
|
||||
|
||||
put_diagnostics(state, plausible_installed?: false, service_error: reason)
|
||||
end
|
||||
end
|
||||
|
|
@ -148,7 +154,7 @@ defmodule Plausible.Verification.Checks.Installation do
|
|||
}
|
||||
|> Map.merge(diffs)
|
||||
|
||||
Logger.info("[VERIFICATION] js_elixir_diff: #{inspect(info)}")
|
||||
Logger.warning("[VERIFICATION] js_elixir_diff: #{inspect(info)}")
|
||||
end
|
||||
|
||||
:telemetry.execute(telemetry_event(any_diff?), %{})
|
||||
|
|
|
|||
|
|
@ -211,11 +211,12 @@ defmodule Plausible.Verification.Diagnostics do
|
|||
def interpret(
|
||||
%__MODULE__{
|
||||
plausible_installed?: true,
|
||||
callback_status: 0,
|
||||
callback_status: callback_status,
|
||||
proxy_likely?: true
|
||||
},
|
||||
_url
|
||||
) do
|
||||
)
|
||||
when callback_status in [0, 500] do
|
||||
error(@errors.proxy_misconfigured)
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue