Skip to content

Commit

Permalink
Add generic exception handler to bigquery. (log2timeline#842)
Browse files Browse the repository at this point in the history
Also, fix linter warning.
  • Loading branch information
ramo-j authored Mar 13, 2024
1 parent 8bf31b8 commit 911122f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions dftimewolf/lib/collectors/bigquery.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,11 @@ def Process(self, container: containers.BigQueryQuery
)
self.ModuleError(str(exception), critical=True)

except Exception as error: # pylint: disable=broad-except
self.ModuleError(
f'Unknown exception encountered: {str(error)}',
critical=True)

out_container: Union[containers.DataFrame, containers.File]
if container.pandas_output:
out_container = containers.DataFrame(
Expand Down
1 change: 1 addition & 0 deletions dftimewolf/lib/exporters/timesketch.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@ def Process(self, container: containers.File) -> None:
critical=False)
if streamer.response and container.description:
streamer.timeline.description = container.description
# pytype: enable=signature-mismatch

def GetThreadOnContainerType(self) -> Type[interface.AttributeContainer]:
return containers.File
Expand Down

0 comments on commit 911122f

Please sign in to comment.