Improve error messages when adding a non-valid source URL (#436)

This commit is contained in:
Kieran authored and GitHub committed 2024-10-25 11:01:46 -07:00
1 parent 6a1b7b0160
commit 108a141c65
4 files changed
+21 -2

No files matched your search

+1
View File
@@ -84,6 +84,7 @@ defmodule Pinchflat.YtDlp.MediaCollection do
{:ok, parsed_json} <- Phoenix.json_library().decode(output) do
{:ok, format_source_details(parsed_json)}
else
{:error, %Jason.DecodeError{}} -> {:error, "Error decoding JSON response"}
err -> err
end
end