Skip to content

Commit

Permalink
fix: add missing error handler
Browse files Browse the repository at this point in the history
  • Loading branch information
gcharest authored Feb 2, 2024
1 parent 1b0cd56 commit f323884
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/integrations/google_workspace/google_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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.
Expand All @@ -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.
Expand Down

0 comments on commit f323884

Please sign in to comment.