-
Notifications
You must be signed in to change notification settings - Fork 347
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
Initially disable Segment app webhooks #1678
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
6 Skipped Deployments
|
export const WebhookStatus = () => { | ||
const { data: config, isLoading, refetch } = trpcClient.configuration.getWebhookConfig.useQuery(); | ||
|
||
console.log(config); |
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.
suggestion: leftover console.log :)
console.log(config); |
try { | ||
await service.enableAppWebhooks(); | ||
} catch (e) { | ||
expect(e).toBeInstanceOf(WebhookActivityService.WebhookActivityServiceWebhooksError); | ||
} |
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.
question: didn't this work?
await expect(service.enableAppWebhooks).throws.toBeInstanceOf(...);
If for some reason it doesn't and we need try...catch then maybe let's also add expect in the try {} block so that we know if test failed (otherwise it will silently pass)
try {
await service.enableAppWebhooks();
expect(false); // this shouldn't be called since exception will be thrown
} catch (e)
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 is leftover from previous implementation - now enableAppWebhooks
will return err | ok
from neverthrow - I will update the tests
const appWebhooksEnableResult = Result.combine( | ||
await Promise.all( | ||
webhooksResult.value.map((webhook) => this.client.enableSingleWebhook(webhook.id)), | ||
), | ||
); |
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.
suggestion: maybe we can make feature request to Saleor API so that we have a mutation to update multiple webhooks at the same time?
If one of these updates fails we will have partial state when some webhooks are enabled and some are not :/
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 - I will create issue for that 👍🏻
🦋 Changeset detectedLatest commit: 3d0b885 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
* log suspicious taxes calculation (#1658) * fix log (#1660) * Use vercel log drain in merchant apps (#1657) * Use vercel log drain * Add changeset * improve log for non zero line (#1663) * Bring back Segment app to monorepo (#1665) * Fix deployment of Segment app (#1666) * Add setup node to GHA workflow (#1673) * Add Sentry to Segment app (#1671) * Add OTEL & improve logs in Segment app (#1675) * Fixed app version send to Segment & how we send events (#1676) * Add use-case to Segment app (#1677) * Initially disable Segment app webhooks (#1678) * Add README to Segment app (#1683) * Improve Segment app logo (#1682) * Fix missing cache for test workflow (#1685) * Add new Vercel log limit (#1684) * Run autofix for monorepo (#1681) * Fix code scan issue with ALLOWED_DOMAIN_PATTERN regex (#1687) --------- Co-authored-by: Lukasz Ostrowski <[email protected]> Co-authored-by: Paweł Chyła <[email protected]>
Scope of the PR
Related issues
Checklist