Skip to content

Commit

Permalink
- Add query exceeded memory limit exception
Browse files Browse the repository at this point in the history
- Add exception.py
  • Loading branch information
RushiT0122 committed Apr 1, 2024
1 parent 14d4461 commit 4e07ab3
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
5 changes: 1 addition & 4 deletions tap_pendo/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from singer import metrics as singer_metrics
from singer import utils
from tap_pendo.discover import discover_streams
from tap_pendo.exception import DependencyException
from tap_pendo.streams import STREAMS, SUB_STREAMS, update_currently_syncing
from tap_pendo.sync import sync_full_table, sync_stream

Expand Down Expand Up @@ -37,10 +38,6 @@ def get_sub_stream_ids():
return sub_stream_ids


class DependencyException(Exception):
pass


def validate_dependencies(selected_stream_ids):
# Validate and raise exceptions if sub-streams are selected but related parents are not selected
errs = []
Expand Down
9 changes: 9 additions & 0 deletions tap_pendo/exception.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
class DependencyException(Exception):
pass

class QueryExceededMemoryLimitException(Exception):
pass


class Server42xRateLimitError(Exception):
pass
6 changes: 1 addition & 5 deletions tap_pendo/streams.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from singer import Transformer, metadata
from singer.utils import now, strftime, strptime_to_utc
from tap_pendo import utils as tap_pendo_utils
from tap_pendo.exception import QueryExceededMemoryLimitException
from tap_pendo.exception import QueryExceededMemoryLimitException, Server42xRateLimitError

KEY_PROPERTIES = ['id']
US_BASE_URL = "https://app.pendo.io"
Expand Down Expand Up @@ -101,10 +101,6 @@ def reset_request_retry_count(details):
Stream.request_retry_count = 1


class Server42xRateLimitError(Exception):
pass


class Endpoints():
endpoint = ""
method = ""
Expand Down

0 comments on commit 4e07ab3

Please sign in to comment.