-
Notifications
You must be signed in to change notification settings - Fork 4
fix: steps added in v2 and handle 403 errors #43
Conversation
@@ -17,7 +16,6 @@ export function convertConsumable( | |||
entityData: { | |||
source: data, | |||
assign: { | |||
...convertProperties(data), |
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.
Do we know what properties that will be dropped by removing this?
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.
This was added in v2.x that hasn't been deployed yet, so I removed it before any customer consumes properties there
@@ -90,7 +97,7 @@ export class ServicesClient { | |||
offset += limit; | |||
data.push(...response.rows); |
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.
It's preferable to iterate the data and call an iteratee instead of collecting all the date first in the case that there's a failure along the way. We should address that in a different ticket.
src/collector/error.ts
Outdated
@@ -4,14 +4,23 @@ export class RetryableError extends Error { | |||
retryable = true; | |||
} | |||
|
|||
export class FatalRequestError extends Error { |
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.
Can we switch out the Error for an IntegrationProviderAPIError?
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.
Or IntegrationProviderAuthorizationError if applicable?
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.
Or IntegrationProviderAuthorizationError if applicable?
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.
Sure!
@@ -53,8 +71,8 @@ export async function buildUserConsumableRelationships({ | |||
// cheerio, a jQuery implementation for the server side, is used | |||
// to easily manipulate the HTML elements and retrieve the user Id | |||
consumableUsers.map(async (consumableUser) => { | |||
if ((consumableUser as ConsumableUser).name) { | |||
const $ = cheerio.load((consumableUser as ConsumableUser).name); | |||
if (consumableUser.name) { |
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.
👍
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.
Ready to approve!
🚀 PR was released in |
No description provided.