Is there a canonical way to raise / log exceptions...
# singer-tap-development
s
Is there a canonical way to raise / log exceptions with the SDK when certain conditions are met? Wouldn't want to touch
_request_with_backoff
,a lthough this has some HTTP exception logic in it. My issue is that Slack will return a response of
Copy code
{
  "ok": false,
  "error": "not_in_channel"
}
And i'd like to reaise the
not_in_channel
error.
a
Some related discussions here: https://gitlab.com/meltano/sdk/-/issues/134
We definitely want to make a smoother path to this, with non-private methods to override.
cc @edgar_ramirez_mondragon
The short answer is that as of today, you'd probably need to override
_request_with_backoff
but in the future we'd either just make that public to encourage overriding or make certain parts of that abstract so that you can override just the parts you need to.
s
Actually, since this is not a problem with the actual request and more of a problem with the response, I think i can add it into
parse_response
e
@stephen_bailey I think we're going to implement an API very similar to what's described in https://gitlab.com/meltano/sdk/-/issues/207#note_666805849. Wdyt?
s
Yes, that approach looks great to me!