lib/eco/api/usecases/graphql/helpers/location/command/result.rb in eco-helpers-2.6.4 vs lib/eco/api/usecases/graphql/helpers/location/command/result.rb in eco-helpers-2.7.0
- old
+ new
@@ -40,14 +40,14 @@
end
def error_msg
return nil unless error?
msg = ''
- msg << "(#{command} '#{node_id}') #{error.message}\n" || ''
+ msg << "(#{command} '#{node_id}') #{error.message}\n"
return msg if error.validationErrors.empty?
- msg << " • " + error.validationErrors.map do |err|
- err.message
- end.join("\n • ")
+
+ msg << " • "
+ msg << error.validationErrors.map(&:message).join("\n • ")
msg
end
def command_result
result&.command