File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88
99from dateutil .parser import parse
1010from singer_sdk import typing as th # JSON Schema typing helpers
11- from singer_sdk .exceptions import FatalAPIError
11+ from singer_sdk .exceptions import FatalAPIError , RetriableAPIError
1212from singer_sdk .helpers .jsonpath import extract_jsonpath
1313
1414from tap_github .client import GitHubDiffStream , GitHubGraphqlStream , GitHubRestStream
@@ -3343,6 +3343,19 @@ def http_headers(self) -> dict:
33433343 headers ["Accept" ] = "application/vnd.github.hawkgirl-preview+json"
33443344 return headers
33453345
3346+ def get_records (self , context : Context | None ) -> Iterable [dict [str , Any ]]:
3347+ try :
3348+ yield from super ().get_records (context )
3349+ except RetriableAPIError as e :
3350+ if "timedout" in str (e ):
3351+ self .logger .warning (
3352+ "Skipping dependencies for %s/%s due to GitHub API timeout." ,
3353+ context and context .get ("org" ),
3354+ context and context .get ("repo" ),
3355+ )
3356+ else :
3357+ raise
3358+
33463359 def post_process (self , row : dict , context : Context | None = None ) -> dict :
33473360 """
33483361 Add a dependency_repo_id top-level field to be used as primary key.
You can’t perform that action at this time.
0 commit comments