lib/fakeit/app/app.rb in fakeit-0.3.0 vs lib/fakeit/app/app.rb in fakeit-0.3.1

- old
+ new

@@ -16,15 +16,11 @@ def handle(operation, request, options) validate(operation, request) response(operation) rescue Fakeit::Validation::ValidationError => e - if options.permissive - Fakeit::Logger.warn(e.message) - response(operation) - else - error(e) - end + Fakeit::Logger.warn(Rainbow(e.message).red) + options.permissive ? response(operation) : error(e) end def error(err) [418, { 'Content-Type' => 'application/json' }, [{ message: err.message }.to_json]] end