Converts JSON schema validation messages to an Error object.