Open ntli239 opened 5 years ago
Could you please provide a failing test case which should pass with the suggested fix?
Hi RST-J Sorry about the delay
data = "http://google.com"
schema = {
"type": "String",
"maxLength": 100
}
errors = JSON::Validator.fully_validate(schema,data)
assert(errors.empty?)
There is one difference I found though, when running this from CLT: the error thrown is WebMock::NetConnectNotAllowedError, not SocketError I had inside the app.
Thank you!
When trying to validate a string that looks like URI, but is not a real one, the error thrown in custom_open is SocketError, not OpenURI::HTTPError, Timeout::Error. It is not caught here, but by other more generic app layer, and is not processed properly as a result. When SocketError is added to the rescue list as a patch, everything works as expected. Could you please update the main code?