diff --git a/app/integrations/google_workspace/google_docs.py b/app/integrations/google_workspace/google_docs.py index 7fc2d0be..ceb0792e 100644 --- a/app/integrations/google_workspace/google_docs.py +++ b/app/integrations/google_workspace/google_docs.py @@ -12,9 +12,10 @@ get(document_id: str) -> dict: Gets a document from Google Docs and returns the document resource. """ -from integrations.google_workspace.google_service import get_google_service +from integrations.google_workspace.google_service import (get_google_service, handle_google_api_errors) +@handle_google_api_errors def create(title: str) -> str: """Creates a new document in Google Docs. @@ -30,6 +31,7 @@ def create(title: str) -> str: return result["documentId"] +@handle_google_api_errors def batch_update(document_id: str, requests: list) -> None: """Applies a list of updates to a document in Google Docs. @@ -48,6 +50,7 @@ def batch_update(document_id: str, requests: list) -> None: ).execute() +@handle_google_api_errors def get(document_id: str) -> dict: """Gets a document from Google Docs.