Skip to content

Commit

Permalink
Exception handling
Browse files Browse the repository at this point in the history
  • Loading branch information
harini-venkataraman committed Apr 29, 2024
1 parent 84ab540 commit d0822cd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions worker/src/unstract/worker/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import uuid
from typing import Any, Optional

from docker.errors import APIError
from dotenv import load_dotenv
from unstract.worker.constants import Env, LogType, ToolKey

Expand Down Expand Up @@ -50,6 +51,11 @@ def __init__(self, image_name: str, image_tag: str) -> None:
f"in {private_registry_credential_path}: {file_err}"
"Logging to private registry might fail, if private tool is used."
)
except APIError as api_err:
logger.error(
f"Exception occured while invoking docker client : {api_err}."
f"Authentication to artifact registry failed."
)

self.image = self._get_image()

Expand Down

0 comments on commit d0822cd

Please sign in to comment.