-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tdl 16369 revert back api access change #90
Changes from 4 commits
5ecb131
37b922f
12b448f
cb1051d
7cf598b
010f7c9
2f1803d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,10 +58,20 @@ def discover_streams(client, config): | |
streams.append({'stream': stream.name, 'tap_stream_id': stream.name, 'schema': schema, 'metadata': stream.load_metadata()}) | ||
|
||
if error_list: | ||
|
||
total_stream = len(STREAMS.values()) # Total no of streams | ||
streams_name = ", ".join(error_list) | ||
message = "HTTP-error-code: 403, Error: You are missing the following required scopes: read. "\ | ||
if len(error_list) != total_stream: | ||
message = "The account credentials supplied do not have 'read' access to the following stream(s): {}. "\ | ||
"The data for these streams would not be collected due to lack of required permission.".format(streams_name) | ||
# If atleast one stream have read permission then just print warning message for all streams | ||
# which does not have read permission | ||
LOGGER.warning(message) | ||
else: | ||
message = "HTTP-error-code: 403, Error: You are missing the following required scopes: read. "\ | ||
"The account credentials supplied do not have read access for the following stream(s): {}".format(streams_name) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @prijendev Can you also update this message as, There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Updated |
||
raise ZendeskForbiddenError(message) | ||
# If none of the streams are having the 'read' access, then the code will raise an error | ||
raise ZendeskForbiddenError(message) | ||
|
||
|
||
return streams |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@prijendev If the stream would not have 'read' access, would we enter the JSON for that stream in the catalog?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we would enter the JSON for that stream in catalog