You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In some situations, simple error messages are uninformative and can sometimes lead to data leaks. And it would be nice to give another message instead.
An example of a leak and unnecessary noise
IncludedIn=Struct.new(:value)dodefincluded_in?(collection)collection.include?(value)enddefinspectvalue.inspectendendexisting_projects=FlexValidations::And.new(positive_integer,FlexValidations::Chain.new(FlexValidations::Decorate.new(IncludedIn),FlexValidations::Predicate.new(:included_in?,Project.all.map(&:id))))putsexisting_projects.validate(3)# chain of validation for 3 failed:# 1. decorated 3 now 3;# 2. 3.included_in?([1, 2]) failed.
In some situations, simple error messages are uninformative and can sometimes lead to data leaks. And it would be nice to give another message instead.
An example of a leak and unnecessary noise
As I can see it should be:
The text was updated successfully, but these errors were encountered: