Closed moisesbenzan closed 1 year ago
Hey @moisesbenzan, thanks for the contribution! Actually, it looks like this import is unnecessary since there is no general except
block. I would suggest changing it to smth like that:
try:
logger.debug(f"Resolving specification file")
self._resolver.parse()
return self._resolver.specification
except prance.ValidationError as error:
raise ParserError(f"OpenAPI validation error: {error}")
except Exception as error:
raise ParserError(f"OpenAPI file parsing error: {error}")
and remove the import of course 🙂
Fixed by #52
Missing import statement causing another exception to be raised when the second except clause was caught (reproducible with an open API schema URL that would return a
404 Not Found
error), due to missing imports.