lib/wcc/media/client.rb in wcc-media-client-0.4.3 vs lib/wcc/media/client.rb in wcc-media-client-0.4.4
- old
+ new
@@ -54,9 +54,11 @@
end
Resource =
Struct.new(:client, :model, :options) do
def find(id, **params)
+ raise ArgumentError, "id param must be present, got: #{id}" unless id && /\S/.match(id.to_s)
+
resp = client.get(
"#{model.endpoint}/#{id}",
default_params('target').merge(params)
)
resp.assert_ok!