Skip to content

Commit

Permalink
try-catch for archivo logic in do_intercept
Browse files Browse the repository at this point in the history
  • Loading branch information
JJ-Author committed Oct 22, 2024
1 parent 97bbc24 commit c3a0473
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions ontologytimemachine/custom_proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,12 @@ def do_intercept(self, _request: HttpParser) -> bool:
# this should actually be not triggered as the CONNECT request should have been blocked before
return False
elif config.httpsInterception == HttpsInterception.ARCHIVO:
if is_archivo_ontology_request(wrapped_request):
logger.info("Intercepting HTTPS request since it is an Archivo ontology request")
return True
try:
if is_archivo_ontology_request(wrapped_request):
logger.info("Intercepting HTTPS request since it is an Archivo ontology request")
return True
except Exception as e:
logger.error(f"Error while checking if request is an Archivo ontology request: {e}", exc_info=True)
logger.info("No Interception of HTTPS request since it is NOT an Archivo ontology request")
return False
else:
Expand Down

0 comments on commit c3a0473

Please sign in to comment.