           end
         end
         resource
-      {:error, cs} ->
-        {:error, add_constraints_to_errors(cs)}
+      error -> error
     end
   end
 

            end
            resource
        end
      {:error, cs} ->
        {:error, add_constraints_to_errors(cs)}
    end
  end


    repo.insert!(struct(resource, params))
    |> insert_or_update_collection(params)
    |> insert_or_update_attributes_for(params)
  end

  def delete(resource, _params) do
