Skip to content

Commit

Permalink
Merge pull request #3 from dbpedia/main
Browse files Browse the repository at this point in the history
try-catch for archivo logic in do_intercept
  • Loading branch information
kuefmz authored Oct 22, 2024
2 parents a069c4a + c3a0473 commit 39b9ab3
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 39b9ab3

Please sign in to comment.