Skip to content

Commit 928359b

Browse files
committed
Implemented CR suggestion
1 parent 0577066 commit 928359b

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

lib/meilisearch/error.ex

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,13 +132,11 @@ defmodule Meilisearch.Error do
132132
)
133133
end
134134

135-
def cast(data) when is_nil(data), do: nil
136-
137-
def cast(""), do: nil
138-
139135
def cast(data) when is_map(data) do
140136
%__MODULE__{}
141137
|> Ecto.Changeset.cast(data, [:message, :link, :type, :code])
142138
|> Ecto.Changeset.apply_changes()
143139
end
140+
141+
def cast(_), do: nil
144142
end

0 commit comments

Comments
 (0)