PipedreamHQ / pipedream

Connect APIs, remarkably fast. Free for developers.
https://pipedream.com
Other
8.32k stars 5.27k forks source link

4057 waitwhile actions #4224

Closed ljdatasci closed 1 year ago

ljdatasci commented 1 year ago

I'm having issues testing the actions for this integration. The responses are not consistent between the API in Postman and the API from the Waitwhile documentation. Also, the TypeScript types for the API are not ready until version 5. The API uses the OpenAPI definition package 'api', which is still on version 4. I was able to test some of the actions, but became stagnant on the 'Retrieve-Customer' action. Here are the results of testing: Screen Shot 2022-09-13 at 3 56 44 PM Screen Shot 2022-09-13 at 10 11 54 AM

vercel[bot] commented 1 year ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
pipedream-docs ✅ Ready (Inspect) Visit Preview Oct 17, 2022 at 5:00PM (UTC)
pipedream-docs-redirect-do-not-edit ✅ Ready (Inspect) Visit Preview Oct 17, 2022 at 5:00PM (UTC)
dylburger commented 1 year ago

Thank you so much for submitting this! We've added it to our backlog to review, and our team has been notified.

dylburger commented 1 year ago

Thanks for submitting this PR! When we review PRs, we follow the Pipedream component guidelines. If you're not familiar, here's a quick checklist:

andrewjschuang commented 1 year ago

Hi @ljdatasci, I noticed your linter automatically changed lots of files that are not related to waitwhile! You can run npx eslint components/waitwhile --fix to automatically fix some linting issues after discarding the unwanted changes in the other apps. And regarding the checks errors:

  1. The package.json version needs to be revved
  2. waithwile-update-customer-note-entry component key is misspelled
ljdatasci commented 1 year ago

Hi @andrewjschuang I fixed the issue with the misspelled component key. I think I ran the linter on the wrong directory and I'm not exactly sure how to discard the changes. Are there any instructions on how to roll back the linter changes?

andrewjschuang commented 1 year ago

Hi @andrewjschuang I fixed the issue with the misspelled component key. I think I ran the linter on the wrong directory and I'm not exactly sure how to discard the changes. Are there any instructions on how to roll back the linter changes?

Can you try the following: git revert 0717bd2123b156e8234fb2a0381a3a6565b03b4d git revert d7a84d01c57c07d2b295cf9625e2ee5db6e266b4 npx pnpm i

ljdatasci commented 1 year ago

git revert d7a84d01c57c07d2b295cf9625e2ee5db6e266b

I received errors: error: commit 0717bd2123b156e8234fb2a0381a3a6565b03b4d is a merge but no -m option was given. fatal: revert failed error: commit 0717bd2123b156e8234fb2a0381a3a6565b03b4d is a merge but no -m option was given. fatal: revert failed

andrewjschuang commented 1 year ago

I received errors: error: commit 0717bd2 is a merge but no -m option was given. fatal: revert failed error: commit 0717bd2 is a merge but no -m option was given. fatal: revert failed

Hmm, I might have been mistaken. The commands below will surely work in this specific case since I have tested them but in general I only recommend this approach if you know what you're doing:

git checkout -b checkpoint # create this branch to do everything in it
git reset --hard origin/4057-Waitwhile-Actions
git reset 658a3f9a
rm components/waitwhile/=7 # delete this file
git add components/waitwhile
git commit -m 'add waitwhile components'
git clean -fd
git rebase origin/master
npx pnpm i
git add pnpm-lock.yaml && git commit -m 'update pnpm-lock.yaml'
git push

If everything is correct, then you can run:

git checkout 4057-Waitwhile-Actions
git reset --hard origin/checkpoint
git push -f
ljdatasci commented 1 year ago

When I ran git rebase origin/master I received these errors: error: cannot rebase: You have unstaged changes. error: Please commit or stash them.

andrewjschuang commented 1 year ago

When I ran git rebase origin/master I received these errors: error: cannot rebase: You have unstaged changes. error: Please commit or stash them.

Did you run git clean -fd?

andrewjschuang commented 1 year ago

If you need to restart you can run git reset --hard origin/4057-Waitwhile-Actions (considering you are in the checkpoint branch)

ljdatasci commented 1 year ago
git rebase origin/master

Yes, I'm in the checkpoint branch. I ran git clean -fd again and then git rebase origin/master, and I still get the same errors. I then started over with git reset --hard origin/4057-Waitwhile-Actions, reran the steps up to git rebase origin/master, and I still get the same error. VS Code Source control says I have 706 pending changes.

andrewjschuang commented 1 year ago

Yes, I'm in the checkpoint branch. I ran git clean -fd again and then git rebase origin/master, and I still get the same errors. I then started over with git reset --hard origin/4057-Waitwhile-Actions, reran the steps up to git rebase origin/master, and I still get the same error. VS Code Source control says I have 706 pending changes.

Can you also run git reset --hard HEAD after git clean -fd?

ljdatasci commented 1 year ago
git add pnpm-lock.yaml && git commit -m 'update pnpm-lock.yaml'

That worked, but when I tried to push my changes with git push I received the message: To push the current branch and set the remote as upstream, use

git push --set-upstream origin checkpoint
andrewjschuang commented 1 year ago

That worked, but when I tried to push my changes with git push I received the message: To push the current branch and set the remote as upstream, use

git push --set-upstream origin checkpoint

Nice, I forgot to add that command. Yeah, go ahead and run that push command and I can take a look if everything is right

ljdatasci commented 1 year ago

That worked, but when I tried to push my changes with git push I received the message: To push the current branch and set the remote as upstream, use

git push --set-upstream origin checkpoint

Nice, I forgot to add that command. Yeah, go ahead and run that push command and I can take a look if everything is right

Done.

andrewjschuang commented 1 year ago

Done.

Nice, now you can run:

git checkout 4057-Waitwhile-Actions
git reset --hard checkpoint
git push -f
ljdatasci commented 1 year ago

git push -f

Done. Is someone going to QA these actions? I had issues with the Waitwhile API and had some errors that could not get more details from the Pipedream console.

ljdatasci commented 1 year ago

I tried pushing my changes per above but received the error: ! [rejected] HEAD -> 4057-Waitwhile-Actions (non-fast-forward) error: failed to push some refs to 'https://github.com/ljdatasci/pipedream.git' hint: Updates were rejected because the tip of your current branch is behind hint: its remote counterpart. Integrate the remote changes (e.g. hint: 'git pull ...') before pushing again. hint: See the 'Note about fast-forwards' in 'git push --help' for details.

should I run these commands?

andrewjschuang commented 1 year ago

I tried pushing my changes per above but received the error: ! [rejected] HEAD -> 4057-Waitwhile-Actions (non-fast-forward) error: failed to push some refs to 'https://github.com/ljdatasci/pipedream.git' hint: Updates were rejected because the tip of your current branch is behind hint: its remote counterpart. Integrate the remote changes (e.g. hint: 'git pull ...') before pushing again. hint: See the 'Note about fast-forwards' in 'git push --help' for details.

should I run these commands?

Yes, you can run git pull

ljdatasci commented 1 year ago

I tried pushing my changes per above but received the error: ! [rejected] HEAD -> 4057-Waitwhile-Actions (non-fast-forward) error: failed to push some refs to 'https://github.com/ljdatasci/pipedream.git' hint: Updates were rejected because the tip of your current branch is behind hint: its remote counterpart. Integrate the remote changes (e.g. hint: 'git pull ...') before pushing again. hint: See the 'Note about fast-forwards' in 'git push --help' for details. should I run these commands?

Yes, you can run git pull

I can use async options for the customerId and the inviteId props, but they are used in several different functions. For example, customerId can be used in the retrieveCustomer, removeCustomer and listCustomerNoEntries functions the the waitwhile.app.ts file. Is there a way to add multiple functions to an async options?

andrewjschuang commented 1 year ago

I can use async options for the customerId and the inviteId props, but they are used in several different functions. For example, customerId can be used in the retrieveCustomer, removeCustomer and listCustomerNoEntries functions the the waitwhile.app.ts file. Is there a way to add multiple functions to an async options?

Yes, after creating the async options() method for the prop in the app file, on the component you can use it just like it is already done by you.

// list-customer-note-entries.ts
props: {
  waitwhile,
  customerId: {
    propDefinition: [
      "customerId",
    ],
  },
},
async run({ $ }) {
  const data = await this.waitwhile.listCustomerNoteEntries(this.customerId);
  $.export("summary", "Successfully retrieved customer note entries");
  return data;a
}
ljdatasci commented 1 year ago

But with the waitwhile actions, a prop would need more than one async function. For example, customerId can be used with listCustomersNotEntries, retrieveCustomer and removeCustomer. Can I add more than one function to the async options, like so:

customerId: { async options(opts) { return listCutomerNotEntries(opts) } async options(opts) { return retrieveCustomer(opts) }

async options(opts) { return removeCustomer(opts) } }

On Mon, Sep 26, 2022 at 12:17 PM Andrew Chuang @.***> wrote:

I can use async options for the customerId and the inviteId props, but they are used in several different functions. For example, customerId can be used in the retrieveCustomer, removeCustomer and listCustomerNoEntries functions the the waitwhile.app.ts file. Is there a way to add multiple functions to an async options?

Yes, after creating the async options() method for the prop in the app file, on the component you can use it just like it is already done by you.

// list-customer-note-entries.ts props: { waitwhile, customerId: { propDefinition: [ "customerId", ], },},async run({ $ }) { const data = await this.waitwhile.listCustomerNoteEntries(this.customerId); $.export("summary", "Successfully retrieved customer note entries"); return data;a}

— Reply to this email directly, view it on GitHub https://github.com/PipedreamHQ/pipedream/pull/4224#issuecomment-1258294473, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMO5IV3SPPSPR7PXXSTOUZLWAHEBPANCNFSM6AAAAAAQLZNYNM . You are receiving this because you were mentioned.Message ID: @.***>

andrewjschuang commented 1 year ago

I'm not sure I'm understanding you are trying to achieve, async options() is a function that fetches a list of customers from the app, in this case, and displays a drop-down list for the user to select one.

If you find it easier, you can find me through our community Slack

ljdatasci commented 1 year ago

I'm not sure I'm understanding you are trying to achieve, async options() is a function that fetches a list of customers from the app, in this case, and displays a drop-down list for the user to select one.

If you find it easier, you can find me through our community Slack

I reviewed the API docs and the only way to get a list of customerIds would be to call the list-customers action and get the customerId from the step exports. There is no separate API call that can give you a list of customerIds. This is true for all other props for the waitwhile components. The user can get any of the action props by step exports in the Pipedream action and passing it to the next action the workflow.

andrewjschuang commented 1 year ago

I reviewed the API docs and the only way to get a list of customerIds would be to call the list-customers action and get the customerId from the step exports. There is no separate API call that can give you a list of customerIds. This is true for all other props for the waitwhile components. The user can get any of the action props by step exports in the Pipedream action and passing it to the next action the workflow.

Sorry, didn't see the notification for this comment. Below is an example for async options() for customerId. The other props can follow the same pattern. More info here.

    customerId: {
      label: "Customer ID",
      type: "string",
      description: "Identifier of customer, automatically derived from visitor contact information if not provided.",
      async options({ prevContext }) {
        const { prevEndAt } = prevContext; // get endAt from previous context
        const {
          endAt, // used for pagination, not tested
          customers,
        } = await this.listCustomers({ // use method implemented in methods below
          startAfter: prevEndAt, // pagination
        });
        return {
          options: customers.map((customer) => ({ // these options will be shown to the user
            label: customer.name, // user-friendly text for the option
            value: customer.email, // usually an id, in this case not sure if there is an id or email for a customer
          })),
          context: { // this will be available as the prevContext variable in the next run (when user clicks load more on pipedream UI)
            prevEndAt: endAt,
          },
        };
      },
    },
andrewjschuang commented 1 year ago

The GitHub projectV2 prop is a good example. As you can see you can also pass variables to async options() if you need to (org and repo). The component that declares the prop can do it by passing it in the third argument in propDefinition.

New Issue with Status source:

    project: {
      propDefinition: [
        common.props.github,
        "projectV2",
        (c) => ({ // contains the previous prop values, both declared and inherited from common
          org: c.org, // org prop value
          repo: c.repo, // repo prop value
        }),
      ],
    },

The org and repo props are inherited from common-webhook-orgs.mjs.

feyzullah commented 1 year ago

Hi @ljdatasci, are you done with the changes? Is this ready for a PR review?

ljdatasci commented 1 year ago

Hi @ljdatasci, are you done with the changes? Is this ready for a PR review?

@feyzullah The changes are done. Ready for PR review.

ljdatasci commented 1 year ago

Hi @ljdatasci, thank you very much for your contribution. I added comments just for unnecessary code. We are almost done, can you please check?

@feyzullah The changes are done.

vunguyenhung commented 1 year ago

Hello @ljdatasci, I have tested this PR and there're some test cases failed or needed improvement.

Please check the test report below for more information Waitwhile_4057_2319.pdf

ljdatasci commented 1 year ago

Hi Leo,

Thanks for the test results. I'm working on them now.

On Fri, Oct 7, 2022 at 12:19 PM Leo Vu @.***> wrote:

Hello @ljdatasci https://github.com/ljdatasci, I have tested this PR and there're some test cases failed or needed improvement.

Please check the test report below for more information Waitwhile_4057_2319.pdf https://github.com/PipedreamHQ/pipedream/files/9735542/Waitwhile_4057_2319.pdf

— Reply to this email directly, view it on GitHub https://github.com/PipedreamHQ/pipedream/pull/4224#issuecomment-1271794974, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMO5IV4PXL4U72FRQY3IOW3WCBES7ANCNFSM6AAAAAAQLZNYNM . You are receiving this because you were mentioned.Message ID: @.***>

ljdatasci commented 1 year ago

Hello @ljdatasci, I have tested this PR and there're some test cases failed or needed improvement.

Please check the test report below for more information Waitwhile_4057_2319.pdf Hi @feyzullah @andrewjschuang, I a little confused on how to use prevContext. I need it for locationIds, but when I run an actions that uses locationIds, should it show a list of locationIds that the user can choose from?

andrewjschuang commented 1 year ago

In general the code looks ok, can you just confirm what is returned in customers in the code below? const {endAt, customers} = await this.listCustomers({startAfter: prevEndAt}); It should be an array of customers.

In async options() the return statement returns an object with options - array of IDs (or array of label:name / value:ID) - these are what the users select in the UI.

context is what you pass for the next call for pagination that will run when the user clicks on Load More:

image
ljdatasci commented 1 year ago

When I run list-customers action I get "cannot read property map of undefined"

On Fri, Oct 7, 2022 at 2:59 PM Andrew Chuang @.***> wrote:

In general the code looks ok, can you just confirm what is returned in customers in the code below? const {endAt, customers} = await this.listCustomers({startAfter: prevEndAt}); It should be an array of customers.

In async options() the return statement returns an object with options - array of IDs (or array of label:name / value:ID) - these are what the users select in the UI.

context is what you pass for the next call for pagination that will run when the user clicks on Load More:

[image: image] https://user-images.githubusercontent.com/15385076/194634370-68762f62-b6f7-427c-bf04-51534ebfaf5e.png

— Reply to this email directly, view it on GitHub https://github.com/PipedreamHQ/pipedream/pull/4224#issuecomment-1271986413, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMO5IV4JBIMXVJHGLW5W7ELWCBXJFANCNFSM6AAAAAAQLZNYNM . You are receiving this because you were mentioned.Message ID: @.***>

feyzullah commented 1 year ago

When I run list-customers action I get "cannot read property map of undefined" On Fri, Oct 7, 2022 at 2:59 PM Andrew Chuang @.> wrote: In general the code looks ok, can you just confirm what is returned in customers in the code below? const {endAt, customers} = await this.listCustomers({startAfter: prevEndAt}); It should be an array of customers. In async options() the return statement returns an object with options - array of IDs (or array of label:name / value:ID) - these are what the users select in the UI. context is what you pass for the next call for pagination that will run when the user clicks on Load More: [image: image] https://user-images.githubusercontent.com/15385076/194634370-68762f62-b6f7-427c-bf04-51534ebfaf5e.png — Reply to this email directly, view it on GitHub <#4224 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMO5IV4JBIMXVJHGLW5W7ELWCBXJFANCNFSM6AAAAAAQLZNYNM . You are receiving this because you were mentioned.Message ID: @.>

Hi @ljdatasci let me test it and tell you about it.

feyzullah commented 1 year ago

Hi @ljdatasci were you able to test these components?

ljdatasci commented 1 year ago

I'm stuck at the "cannot read map of undefined" error for most of the components. My code looks correct to me.

On Fri, Oct 7, 2022 at 4:07 PM feyzullah @.***> wrote:

Hi @ljdatasci https://github.com/ljdatasci were you able to test these components?

— Reply to this email directly, view it on GitHub https://github.com/PipedreamHQ/pipedream/pull/4224#issuecomment-1272046103, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMO5IVYBWJAMEXRSQRBXMBLWCB7GVANCNFSM6AAAAAAQLZNYNM . You are receiving this because you were mentioned.Message ID: @.***>

feyzullah commented 1 year ago

I'm stuck at the "cannot read map of undefined" error for most of the components. My code looks correct to me. On Fri, Oct 7, 2022 at 4:07 PM feyzullah @.> wrote: Hi @ljdatasci https://github.com/ljdatasci were you able to test these components? — Reply to this email directly, view it on GitHub <#4224 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMO5IVYBWJAMEXRSQRBXMBLWCB7GVANCNFSM6AAAAAAQLZNYNM . You are receiving this because you were mentioned.Message ID: @.>

When I check listLocations response, it returns something like

{
  results: [
    {
      playSoundPublicWaitlistGuestAlerted: false,
      showEmailBooking: null,
      //... lots of fields
    }
  ],
  limit: 20,
  startAt: 'TPhIvQ0Be3QqFOJH5kvt',
  endAt: 'TPhIvQ0Be3QqFOJH5kvt'
}

So it returns one object in results array and it seems that this object is not relevant. Since response object does not have a filed named locationIds it is undefined and undefined has no property map for sure. I think openapi definition might be wrong and getLocations fetches something irrelevant in this case. Can you please use axios and fetch from endpoints given in API documentation? At least if we try some components, we can see if openapi definition is right or not.

ljdatasci commented 1 year ago

I'm stuck at the "cannot read map of undefined" error for most of the components. My code looks correct to me. On Fri, Oct 7, 2022 at 4:07 PM feyzullah @.**> wrote: Hi @ljdatasci https://github.com/ljdatasci were you able to test these components? — Reply to this email directly, view it on GitHub <#4224 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMO5IVYBWJAMEXRSQRBXMBLWCB7GVANCNFSM6AAAAAAQLZNYNM . You are receiving this because you were mentioned.Message ID: @.**>

When I check listLocations response, it returns something like

{
  results: [
    {
      playSoundPublicWaitlistGuestAlerted: false,
      showEmailBooking: null,
      //... lots of fields
    }
  ],
  limit: 20,
  startAt: 'TPhIvQ0Be3QqFOJH5kvt',
  endAt: 'TPhIvQ0Be3QqFOJH5kvt'
}

So it returns one object in results array and it seems that this object is not relevant. Since response object does not have a filed named locationIds it is undefined and undefined has no property map for sure. I think openapi definition might be wrong and getLocations fetches something irrelevant in this case. Can you please use axios and fetch from endpoints given in API documentation? At least if we try some components, we can see if openapi definition is right or not.

@feyzullah I think the problem is the response that returns from the API is an array called results. In that array is a field called id that is the locationId. I'm testing the components now and deconstructing the results array from the response.

feyzullah commented 1 year ago

I'm stuck at the "cannot read map of undefined" error for most of the components. My code looks correct to me. On Fri, Oct 7, 2022 at 4:07 PM feyzullah @.**> wrote: Hi @ljdatasci https://github.com/ljdatasci were you able to test these components? — Reply to this email directly, view it on GitHub <#4224 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMO5IVYBWJAMEXRSQRBXMBLWCB7GVANCNFSM6AAAAAAQLZNYNM . You are receiving this because you were mentioned.Message ID: @.**>

When I check listLocations response, it returns something like

{
  results: [
    {
      playSoundPublicWaitlistGuestAlerted: false,
      showEmailBooking: null,
      //... lots of fields
    }
  ],
  limit: 20,
  startAt: 'TPhIvQ0Be3QqFOJH5kvt',
  endAt: 'TPhIvQ0Be3QqFOJH5kvt'
}

So it returns one object in results array and it seems that this object is not relevant. Since response object does not have a filed named locationIds it is undefined and undefined has no property map for sure. I think openapi definition might be wrong and getLocations fetches something irrelevant in this case. Can you please use axios and fetch from endpoints given in API documentation? At least if we try some components, we can see if openapi definition is right or not.

@feyzullah I think the problem is the response that returns from the API is an array called results. In that array is a field called id that is the locationId. I'm testing the components now and deconstructing the results array from the response.

@ljdatasci thank you very much. Please let me know if you need more assistance. I set up an account and connected it to Pipedream to test if anything is needed

ljdatasci commented 1 year ago

I'm stuck at the "cannot read map of undefined" error for most of the components. My code looks correct to me. On Fri, Oct 7, 2022 at 4:07 PM feyzullah @.**> wrote: Hi @ljdatasci https://github.com/ljdatasci were you able to test these components? — Reply to this email directly, view it on GitHub <#4224 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMO5IVYBWJAMEXRSQRBXMBLWCB7GVANCNFSM6AAAAAAQLZNYNM . You are receiving this because you were mentioned.Message ID: @.**>

When I check listLocations response, it returns something like

{
  results: [
    {
      playSoundPublicWaitlistGuestAlerted: false,
      showEmailBooking: null,
      //... lots of fields
    }
  ],
  limit: 20,
  startAt: 'TPhIvQ0Be3QqFOJH5kvt',
  endAt: 'TPhIvQ0Be3QqFOJH5kvt'
}

So it returns one object in results array and it seems that this object is not relevant. Since response object does not have a filed named locationIds it is undefined and undefined has no property map for sure. I think openapi definition might be wrong and getLocations fetches something irrelevant in this case. Can you please use axios and fetch from endpoints given in API documentation? At least if we try some components, we can see if openapi definition is right or not.

@feyzullah I think the problem is the response that returns from the API is an array called results. In that array is a field called id that is the locationId. I'm testing the components now and deconstructing the results array from the response.

@ljdatasci thank you very much. Please let me know if you need more assistance. I set up an account and connected it to Pipedream to test if anything is needed

@feyzullah That was the problem. Here's a screenshot with the locationIds prepopulated. I'm testing all of the actions now. Screen Shot 2022-10-07 at 4 42 37 PM

feyzullah commented 1 year ago

Hi @ljdatasci is this one ready for another QA review?

ljdatasci commented 1 year ago

Hi @ljdatasci is this one ready for another QA review?

Yes

vunguyenhung commented 1 year ago

Hello @ljdatasci, I have tested this PR and there're some test cases failed or needed improvement.

Please check the test report below for more information Waitwhile_4057_2217.pdf

ljdatasci commented 1 year ago

Waitwhile_4057_2217.pdf

@vunguyenhung I'm working on the actions now.

ljdatasci commented 1 year ago

Waitwhile_4057_2217.pdf

@vunguyenhung I'm working on the actions now.

@vunguyenhung Here's the response from Dylan at Waitwhile: Got some clarity here. Looks like the API is still available to Free Accounts for clients to try out before upgrading to the Paid Subscription plans. This would explain some of the endpoints not working as not all of them are available for the Free Account. I also do not have a list of endpoints that are available for the Free Account, I do apologize

ljdatasci commented 1 year ago

@andrewjschuang @feyzullah @vunguyenhung The reason why the actions are failing is only a few of the API endpoints are available under the Free Plan. To run the remaining API endpoints, upgrade to a Paid Plan.

Here's the response from Dylan at Waitwhile: Got some clarity here. Looks like the API is still available to Free Accounts for clients to try out before upgrading to the Paid Subscription plans. This would explain some of the endpoints not working as not all of them are available for the Free Account. I also do not have a list of endpoints that are available for the Free Account, I do apologize

vunguyenhung commented 1 year ago

Hello @ljdatasci, sorry for the delay.

I see that some API requires paid plan, I think we can skip their tests in this case.

The improvement I would love to see is that when the error is returned from Waitwhile, the action should show the error message from Waitwhile response instead of the general [Object Response] string. For example, given that error from Waitwhile API is You need a paid plan to use this API. You can do this by throwing a new error and pass in the error message

throw new Error(messagefFromAPI)
ljdatasci commented 1 year ago

@vunguyenhung I added the error handling for the APIs that required a Paid Plan. I'm still getting the response "component create api call responded with status: 400, body: {"error":"{\"name\":\"UserError\",\"message\":\"bad propDefinition value for prop undefined (should be [\u003capp\u003e, \u003cappPropName\u003e, \u003coptionalOptsFn\u003e])\"}"}" from the update-customer action. I contacted waitwhile to make sure that all of the props were defined correctly, but they responded that the issue was probably due to subscriptions and that users need to be on the Paid Plan in order to use the rest of the API.