Skip to content

Commit

Permalink
fix: add missing error handler (#395)
Browse files Browse the repository at this point in the history
* fix: add missing error handler

* fix: fmt
  • Loading branch information
gcharest authored Feb 2, 2024
1 parent 1b0cd56 commit 5ecaf15
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 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,13 @@
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 +34,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 +53,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 5ecaf15

Please sign in to comment.