lib/mb/api/validators/sem_ver.rb in motherbrain-1.1.1 vs lib/mb/api/validators/sem_ver.rb in motherbrain-1.1.2

- old
+ new

@@ -7,12 +7,12 @@ class SemVer < Grape::Validations::Validator def validate_param!(attr_name, params) return nil if params[attr_name].nil? ver_string = params[attr_name].gsub('_', '.') - Solve::Version.split(ver_string) + Semverse::Version.split(ver_string) params[attr_name] = ver_string - rescue Solve::Errors::InvalidVersionFormat => ex + rescue Semverse::InvalidVersionFormat => ex throw :error, status: 400, message: ex.to_s end end end