Replace Logger with getLogger and update next version
This commit replaces the use of Logger with getLogger in various parts of the code to handle logging. The Logger has been replaced with getLogger, which assists in getting logs in an asynchronous manner. In addition to this, it updates the next version in pnpm-lock.yaml from next@14.2.0-canary.61 to next@14.2.0-canary.62 and various other dependencies. Also made minor annotations and comments to the function 'isBrowser' and 'formatCurrency' in the 'utils.ts' file.
This commit is contained in:
@@ -4,7 +4,7 @@ import { RedirectType, redirect } from 'next/navigation';
|
||||
|
||||
import { z } from 'zod';
|
||||
|
||||
import { Logger } from '@kit/shared/logger';
|
||||
import { getLogger } from '@kit/shared/logger';
|
||||
import { requireUser } from '@kit/supabase/require-user';
|
||||
import { getSupabaseServerActionClient } from '@kit/supabase/server-actions-client';
|
||||
|
||||
@@ -31,7 +31,8 @@ export async function deletePersonalAccountAction(formData: FormData) {
|
||||
const auth = await requireUser(client);
|
||||
|
||||
if (auth.error) {
|
||||
Logger.error(`User is not authenticated. Redirecting to login page`);
|
||||
const logger = await getLogger();
|
||||
logger.error(`User is not authenticated. Redirecting to login page`);
|
||||
|
||||
redirect(auth.redirectTo);
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import { SupabaseClient } from '@supabase/supabase-js';
|
||||
|
||||
import { Mailer } from '@kit/mailers';
|
||||
import { Logger } from '@kit/shared/logger';
|
||||
import { getLogger } from '@kit/shared/logger';
|
||||
import { Database } from '@kit/supabase/database';
|
||||
|
||||
/**
|
||||
@@ -35,8 +34,9 @@ export class DeletePersonalAccountService {
|
||||
};
|
||||
}) {
|
||||
const userId = params.userId;
|
||||
const logger = await getLogger();
|
||||
|
||||
Logger.info(
|
||||
logger.info(
|
||||
{ name: this.namespace, userId },
|
||||
'User requested deletion. Processing...',
|
||||
);
|
||||
@@ -45,7 +45,7 @@ export class DeletePersonalAccountService {
|
||||
try {
|
||||
await params.adminClient.auth.admin.deleteUser(userId);
|
||||
} catch (error) {
|
||||
Logger.error(
|
||||
logger.error(
|
||||
{
|
||||
name: this.namespace,
|
||||
userId,
|
||||
@@ -60,7 +60,7 @@ export class DeletePersonalAccountService {
|
||||
// Send account deletion email
|
||||
if (params.userEmail) {
|
||||
try {
|
||||
Logger.info(
|
||||
logger.info(
|
||||
{
|
||||
name: this.namespace,
|
||||
userId,
|
||||
@@ -74,8 +74,16 @@ export class DeletePersonalAccountService {
|
||||
userDisplayName: params.userEmail,
|
||||
userEmail: params.userEmail,
|
||||
});
|
||||
|
||||
logger.info(
|
||||
{
|
||||
name: this.namespace,
|
||||
userId,
|
||||
},
|
||||
`Account deletion email sent`,
|
||||
);
|
||||
} catch (error) {
|
||||
Logger.error(
|
||||
logger.error(
|
||||
{
|
||||
name: this.namespace,
|
||||
userId,
|
||||
@@ -94,13 +102,15 @@ export class DeletePersonalAccountService {
|
||||
productName: string;
|
||||
}) {
|
||||
const { renderAccountDeleteEmail } = await import('@kit/email-templates');
|
||||
const { getMailer } = await import('@kit/mailers');
|
||||
const mailer = await getMailer();
|
||||
|
||||
const html = renderAccountDeleteEmail({
|
||||
userDisplayName: params.userDisplayName,
|
||||
productName: params.productName,
|
||||
});
|
||||
|
||||
await Mailer.sendEmail({
|
||||
return mailer.sendEmail({
|
||||
to: params.userEmail,
|
||||
from: params.fromEmail,
|
||||
subject: 'Account Deletion Request',
|
||||
|
||||
@@ -4,7 +4,7 @@ import { redirect } from 'next/navigation';
|
||||
|
||||
import { z } from 'zod';
|
||||
|
||||
import { Logger } from '@kit/shared/logger';
|
||||
import { getLogger } from '@kit/shared/logger';
|
||||
import { requireUser } from '@kit/supabase/require-user';
|
||||
import { getSupabaseServerActionClient } from '@kit/supabase/server-actions-client';
|
||||
|
||||
@@ -31,6 +31,7 @@ export async function createOrganizationAccountAction(
|
||||
redirect(auth.redirectTo);
|
||||
}
|
||||
|
||||
const logger = await getLogger();
|
||||
const userId = auth.data.id;
|
||||
|
||||
const createAccountResponse = await service.createNewOrganizationAccount({
|
||||
@@ -39,7 +40,7 @@ export async function createOrganizationAccountAction(
|
||||
});
|
||||
|
||||
if (createAccountResponse.error) {
|
||||
Logger.error(
|
||||
logger.error(
|
||||
{
|
||||
userId,
|
||||
error: createAccountResponse.error,
|
||||
@@ -51,6 +52,15 @@ export async function createOrganizationAccountAction(
|
||||
throw new Error('Error creating team account');
|
||||
}
|
||||
|
||||
logger.info(
|
||||
{
|
||||
userId,
|
||||
accountName,
|
||||
name: 'accounts',
|
||||
},
|
||||
`Team account created successfully`,
|
||||
);
|
||||
|
||||
const accountHomePath =
|
||||
TEAM_ACCOUNTS_HOME_PATH + '/' + createAccountResponse.data.slug;
|
||||
|
||||
|
||||
@@ -2,8 +2,7 @@ import { SupabaseClient } from '@supabase/supabase-js';
|
||||
|
||||
import { z } from 'zod';
|
||||
|
||||
import { Mailer } from '@kit/mailers';
|
||||
import { Logger } from '@kit/shared/logger';
|
||||
import { getLogger } from '@kit/shared/logger';
|
||||
import { Database } from '@kit/supabase/database';
|
||||
|
||||
type Invitation = Database['public']['Tables']['invitations']['Row'];
|
||||
@@ -57,8 +56,12 @@ export class AccountInvitationsWebhookService {
|
||||
throw team.error;
|
||||
}
|
||||
|
||||
const logger = await getLogger();
|
||||
|
||||
try {
|
||||
const { renderInviteEmail } = await import('@kit/email-templates');
|
||||
const { getMailer } = await import('@kit/mailers');
|
||||
const mailer = await getMailer();
|
||||
|
||||
const html = renderInviteEmail({
|
||||
link: this.getInvitationLink(invitation.invite_token),
|
||||
@@ -68,26 +71,34 @@ export class AccountInvitationsWebhookService {
|
||||
teamName: team.data.name,
|
||||
});
|
||||
|
||||
await Mailer.sendEmail({
|
||||
from: env.emailSender,
|
||||
to: invitation.email,
|
||||
subject: 'You have been invited to join a team',
|
||||
html,
|
||||
});
|
||||
|
||||
Logger.info('Invitation email sent', {
|
||||
email: invitation.email,
|
||||
account: invitation.account_id,
|
||||
name: this.namespace,
|
||||
});
|
||||
await mailer
|
||||
.sendEmail({
|
||||
from: env.emailSender,
|
||||
to: invitation.email,
|
||||
subject: 'You have been invited to join a team',
|
||||
html,
|
||||
})
|
||||
.then(() => {
|
||||
logger.info('Invitation email sent', {
|
||||
email: invitation.email,
|
||||
account: invitation.account_id,
|
||||
name: this.namespace,
|
||||
});
|
||||
})
|
||||
.catch((error) => {
|
||||
logger.warn(
|
||||
{ error, name: this.namespace },
|
||||
'Failed to send invitation email',
|
||||
);
|
||||
});
|
||||
|
||||
return {
|
||||
success: true,
|
||||
};
|
||||
} catch (error) {
|
||||
Logger.warn(
|
||||
logger.warn(
|
||||
{ error, name: this.namespace },
|
||||
'Failed to send invitation email',
|
||||
'Failed to invite user to team',
|
||||
);
|
||||
|
||||
return {
|
||||
|
||||
@@ -4,7 +4,7 @@ import { addDays, formatISO } from 'date-fns';
|
||||
import 'server-only';
|
||||
import { z } from 'zod';
|
||||
|
||||
import { Logger } from '@kit/shared/logger';
|
||||
import { getLogger } from '@kit/shared/logger';
|
||||
import { Database } from '@kit/supabase/database';
|
||||
|
||||
import { DeleteInvitationSchema } from '../../schema/delete-invitation.schema';
|
||||
@@ -17,7 +17,9 @@ export class AccountInvitationsService {
|
||||
constructor(private readonly client: SupabaseClient<Database>) {}
|
||||
|
||||
async deleteInvitation(params: z.infer<typeof DeleteInvitationSchema>) {
|
||||
Logger.info('Removing invitation', {
|
||||
const logger = await getLogger();
|
||||
|
||||
logger.info('Removing invitation', {
|
||||
name: this.namespace,
|
||||
...params,
|
||||
});
|
||||
@@ -33,7 +35,7 @@ export class AccountInvitationsService {
|
||||
throw error;
|
||||
}
|
||||
|
||||
Logger.info('Invitation successfully removed', {
|
||||
logger.info('Invitation successfully removed', {
|
||||
...params,
|
||||
name: this.namespace,
|
||||
});
|
||||
@@ -42,7 +44,9 @@ export class AccountInvitationsService {
|
||||
}
|
||||
|
||||
async updateInvitation(params: z.infer<typeof UpdateInvitationSchema>) {
|
||||
Logger.info('Updating invitation', {
|
||||
const logger = await getLogger();
|
||||
|
||||
logger.info('Updating invitation', {
|
||||
...params,
|
||||
name: this.namespace,
|
||||
});
|
||||
@@ -60,7 +64,7 @@ export class AccountInvitationsService {
|
||||
throw error;
|
||||
}
|
||||
|
||||
Logger.info('Invitation successfully updated', {
|
||||
logger.info('Invitation successfully updated', {
|
||||
...params,
|
||||
name: this.namespace,
|
||||
});
|
||||
@@ -75,7 +79,9 @@ export class AccountInvitationsService {
|
||||
invitations: z.infer<typeof InviteMembersSchema>['invitations'];
|
||||
accountSlug: string;
|
||||
}) {
|
||||
Logger.info(
|
||||
const logger = await getLogger();
|
||||
|
||||
logger.info(
|
||||
{
|
||||
account: accountSlug,
|
||||
invitations,
|
||||
@@ -91,7 +97,7 @@ export class AccountInvitationsService {
|
||||
.single();
|
||||
|
||||
if (!accountResponse.data) {
|
||||
Logger.error(
|
||||
logger.error(
|
||||
{
|
||||
accountSlug,
|
||||
name: this.namespace,
|
||||
@@ -108,7 +114,7 @@ export class AccountInvitationsService {
|
||||
});
|
||||
|
||||
if (response.error) {
|
||||
Logger.error(
|
||||
logger.error(
|
||||
{
|
||||
accountSlug,
|
||||
error: response.error,
|
||||
@@ -124,7 +130,7 @@ export class AccountInvitationsService {
|
||||
? response.data
|
||||
: [response.data];
|
||||
|
||||
Logger.info(
|
||||
logger.info(
|
||||
{
|
||||
account: accountSlug,
|
||||
count: responseInvitations.length,
|
||||
@@ -157,7 +163,9 @@ export class AccountInvitationsService {
|
||||
}
|
||||
|
||||
async renewInvitation(invitationId: number) {
|
||||
Logger.info('Renewing invitation', {
|
||||
const logger = await getLogger();
|
||||
|
||||
logger.info('Renewing invitation', {
|
||||
invitationId,
|
||||
name: this.namespace,
|
||||
});
|
||||
@@ -177,7 +185,7 @@ export class AccountInvitationsService {
|
||||
throw error;
|
||||
}
|
||||
|
||||
Logger.info('Invitation successfully renewed', {
|
||||
logger.info('Invitation successfully renewed', {
|
||||
invitationId,
|
||||
name: this.namespace,
|
||||
});
|
||||
|
||||
@@ -3,7 +3,7 @@ import { SupabaseClient } from '@supabase/supabase-js';
|
||||
import 'server-only';
|
||||
import { z } from 'zod';
|
||||
|
||||
import { Logger } from '@kit/shared/logger';
|
||||
import { getLogger } from '@kit/shared/logger';
|
||||
import { Database } from '@kit/supabase/database';
|
||||
|
||||
import { RemoveMemberSchema } from '../../schema/remove-member.schema';
|
||||
@@ -17,12 +17,14 @@ export class AccountMembersService {
|
||||
constructor(private readonly client: SupabaseClient<Database>) {}
|
||||
|
||||
async removeMemberFromAccount(params: z.infer<typeof RemoveMemberSchema>) {
|
||||
const logger = await getLogger();
|
||||
|
||||
const ctx = {
|
||||
namespace: this.namespace,
|
||||
...params,
|
||||
};
|
||||
|
||||
Logger.info(ctx, `Removing member from account...`);
|
||||
logger.info(ctx, `Removing member from account...`);
|
||||
|
||||
const { data, error } = await this.client
|
||||
.from('accounts_memberships')
|
||||
@@ -33,7 +35,7 @@ export class AccountMembersService {
|
||||
});
|
||||
|
||||
if (error) {
|
||||
Logger.error(
|
||||
logger.error(
|
||||
{
|
||||
...ctx,
|
||||
error,
|
||||
@@ -44,7 +46,7 @@ export class AccountMembersService {
|
||||
throw error;
|
||||
}
|
||||
|
||||
Logger.info(
|
||||
logger.info(
|
||||
ctx,
|
||||
`Successfully removed member from account. Verifying seat count...`,
|
||||
);
|
||||
@@ -57,12 +59,14 @@ export class AccountMembersService {
|
||||
}
|
||||
|
||||
async updateMemberRole(params: z.infer<typeof UpdateMemberRoleSchema>) {
|
||||
const logger = await getLogger();
|
||||
|
||||
const ctx = {
|
||||
namespace: this.namespace,
|
||||
...params,
|
||||
};
|
||||
|
||||
Logger.info(ctx, `Updating member role...`);
|
||||
logger.info(ctx, `Updating member role...`);
|
||||
|
||||
const { data, error } = await this.client
|
||||
.from('accounts_memberships')
|
||||
@@ -75,7 +79,7 @@ export class AccountMembersService {
|
||||
});
|
||||
|
||||
if (error) {
|
||||
Logger.error(
|
||||
logger.error(
|
||||
{
|
||||
...ctx,
|
||||
error,
|
||||
@@ -86,7 +90,7 @@ export class AccountMembersService {
|
||||
throw error;
|
||||
}
|
||||
|
||||
Logger.info(ctx, `Successfully updated member role`);
|
||||
logger.info(ctx, `Successfully updated member role`);
|
||||
|
||||
return data;
|
||||
}
|
||||
@@ -94,12 +98,14 @@ export class AccountMembersService {
|
||||
async transferOwnership(
|
||||
params: z.infer<typeof TransferOwnershipConfirmationSchema>,
|
||||
) {
|
||||
const logger = await getLogger();
|
||||
|
||||
const ctx = {
|
||||
namespace: this.namespace,
|
||||
...params,
|
||||
};
|
||||
|
||||
Logger.info(ctx, `Transferring ownership of account...`);
|
||||
logger.info(ctx, `Transferring ownership of account...`);
|
||||
|
||||
const { data, error } = await this.client.rpc(
|
||||
'transfer_team_account_ownership',
|
||||
@@ -110,7 +116,7 @@ export class AccountMembersService {
|
||||
);
|
||||
|
||||
if (error) {
|
||||
Logger.error(
|
||||
logger.error(
|
||||
{ ...ctx, error },
|
||||
`Failed to transfer ownership of account`,
|
||||
);
|
||||
@@ -118,7 +124,7 @@ export class AccountMembersService {
|
||||
throw error;
|
||||
}
|
||||
|
||||
Logger.info(ctx, `Successfully transferred ownership of account`);
|
||||
logger.info(ctx, `Successfully transferred ownership of account`);
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { SupabaseClient } from '@supabase/supabase-js';
|
||||
|
||||
import { BillingGatewayService } from '@kit/billing-gateway';
|
||||
import { Logger } from '@kit/shared/logger';
|
||||
import { getLogger } from '@kit/shared/logger';
|
||||
import { Database } from '@kit/supabase/database';
|
||||
|
||||
export class AccountPerSeatBillingService {
|
||||
@@ -10,7 +10,9 @@ export class AccountPerSeatBillingService {
|
||||
constructor(private readonly client: SupabaseClient<Database>) {}
|
||||
|
||||
async getPerSeatSubscriptionItem(accountId: string) {
|
||||
Logger.info(
|
||||
const logger = await getLogger();
|
||||
|
||||
logger.info(
|
||||
{
|
||||
name: this.namespace,
|
||||
accountId,
|
||||
@@ -36,7 +38,7 @@ export class AccountPerSeatBillingService {
|
||||
.maybeSingle();
|
||||
|
||||
if (error) {
|
||||
Logger.info(
|
||||
logger.error(
|
||||
{
|
||||
name: this.namespace,
|
||||
accountId,
|
||||
@@ -49,7 +51,7 @@ export class AccountPerSeatBillingService {
|
||||
}
|
||||
|
||||
if (!data?.subscription_items) {
|
||||
Logger.info(
|
||||
logger.info(
|
||||
{ name: this.namespace, accountId },
|
||||
`No per-seat subscription item found for account ${accountId}. Exiting...`,
|
||||
);
|
||||
@@ -57,7 +59,7 @@ export class AccountPerSeatBillingService {
|
||||
return;
|
||||
}
|
||||
|
||||
Logger.info(
|
||||
logger.info(
|
||||
{
|
||||
name: this.namespace,
|
||||
accountId,
|
||||
@@ -69,6 +71,7 @@ export class AccountPerSeatBillingService {
|
||||
}
|
||||
|
||||
async increaseSeats(accountId: string) {
|
||||
const logger = await getLogger();
|
||||
const subscription = await this.getPerSeatSubscriptionItem(accountId);
|
||||
|
||||
if (!subscription) {
|
||||
@@ -85,7 +88,7 @@ export class AccountPerSeatBillingService {
|
||||
|
||||
const billingGateway = new BillingGatewayService(subscription.provider);
|
||||
|
||||
Logger.info(
|
||||
logger.info(
|
||||
{
|
||||
name: this.namespace,
|
||||
accountId,
|
||||
@@ -96,7 +99,7 @@ export class AccountPerSeatBillingService {
|
||||
|
||||
const promises = subscriptionItems.map(async (item) => {
|
||||
try {
|
||||
Logger.info(
|
||||
logger.info(
|
||||
{
|
||||
name: this.namespace,
|
||||
accountId,
|
||||
@@ -112,7 +115,7 @@ export class AccountPerSeatBillingService {
|
||||
quantity: item.quantity + 1,
|
||||
});
|
||||
|
||||
Logger.info(
|
||||
logger.info(
|
||||
{
|
||||
name: this.namespace,
|
||||
accountId,
|
||||
@@ -122,7 +125,7 @@ export class AccountPerSeatBillingService {
|
||||
`Subscription item updated successfully`,
|
||||
);
|
||||
} catch (error) {
|
||||
Logger.error(
|
||||
logger.error(
|
||||
{
|
||||
name: this.namespace,
|
||||
accountId,
|
||||
@@ -137,6 +140,7 @@ export class AccountPerSeatBillingService {
|
||||
}
|
||||
|
||||
async decreaseSeats(accountId: string) {
|
||||
const logger = await getLogger();
|
||||
const subscription = await this.getPerSeatSubscriptionItem(accountId);
|
||||
|
||||
if (!subscription) {
|
||||
@@ -151,7 +155,7 @@ export class AccountPerSeatBillingService {
|
||||
return;
|
||||
}
|
||||
|
||||
Logger.info(
|
||||
logger.info(
|
||||
{
|
||||
name: this.namespace,
|
||||
accountId,
|
||||
@@ -164,7 +168,7 @@ export class AccountPerSeatBillingService {
|
||||
|
||||
const promises = subscriptionItems.map(async (item) => {
|
||||
try {
|
||||
Logger.info(
|
||||
logger.info(
|
||||
{
|
||||
name: this.namespace,
|
||||
accountId,
|
||||
@@ -180,7 +184,7 @@ export class AccountPerSeatBillingService {
|
||||
quantity: item.quantity - 1,
|
||||
});
|
||||
|
||||
Logger.info(
|
||||
logger.info(
|
||||
{
|
||||
name: this.namespace,
|
||||
accountId,
|
||||
@@ -190,7 +194,7 @@ export class AccountPerSeatBillingService {
|
||||
`Subscription item updated successfully`,
|
||||
);
|
||||
} catch (error) {
|
||||
Logger.error(
|
||||
logger.error(
|
||||
{
|
||||
name: this.namespace,
|
||||
accountId,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { SupabaseClient } from '@supabase/supabase-js';
|
||||
|
||||
import { Logger } from '@kit/shared/logger';
|
||||
import { getLogger } from '@kit/shared/logger';
|
||||
import { Database } from '@kit/supabase/database';
|
||||
|
||||
export class CreateTeamAccountService {
|
||||
@@ -8,13 +8,15 @@ export class CreateTeamAccountService {
|
||||
|
||||
constructor(private readonly client: SupabaseClient<Database>) {}
|
||||
|
||||
createNewOrganizationAccount(params: { name: string; userId: string }) {
|
||||
Logger.info(
|
||||
async createNewOrganizationAccount(params: { name: string; userId: string }) {
|
||||
const logger = await getLogger();
|
||||
|
||||
logger.info(
|
||||
{ ...params, namespace: this.namespace },
|
||||
`Creating new team account...`,
|
||||
);
|
||||
|
||||
return this.client.rpc('create_account', {
|
||||
return await this.client.rpc('create_account', {
|
||||
account_name: params.name,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ import { SupabaseClient } from '@supabase/supabase-js';
|
||||
|
||||
import 'server-only';
|
||||
|
||||
import { Logger } from '@kit/shared/logger';
|
||||
import { getLogger } from '@kit/shared/logger';
|
||||
import { Database } from '@kit/supabase/database';
|
||||
|
||||
export class DeleteTeamAccountService {
|
||||
@@ -24,7 +24,9 @@ export class DeleteTeamAccountService {
|
||||
userId: string;
|
||||
},
|
||||
) {
|
||||
Logger.info(
|
||||
const logger = await getLogger();
|
||||
|
||||
logger.info(
|
||||
{
|
||||
name: this.namespace,
|
||||
accountId: params.accountId,
|
||||
@@ -40,7 +42,7 @@ export class DeleteTeamAccountService {
|
||||
.eq('id', params.accountId);
|
||||
|
||||
if (error) {
|
||||
Logger.error(
|
||||
logger.error(
|
||||
{
|
||||
name: this.namespace,
|
||||
accountId: params.accountId,
|
||||
@@ -53,7 +55,7 @@ export class DeleteTeamAccountService {
|
||||
throw new Error('Failed to delete team account');
|
||||
}
|
||||
|
||||
Logger.info(
|
||||
logger.info(
|
||||
{
|
||||
name: this.namespace,
|
||||
accountId: params.accountId,
|
||||
|
||||
@@ -3,7 +3,7 @@ import { SupabaseClient } from '@supabase/supabase-js';
|
||||
import 'server-only';
|
||||
import { z } from 'zod';
|
||||
|
||||
import { Logger } from '@kit/shared/logger';
|
||||
import { getLogger } from '@kit/shared/logger';
|
||||
import { Database } from '@kit/supabase/database';
|
||||
|
||||
const Schema = z.object({
|
||||
@@ -17,12 +17,14 @@ export class LeaveTeamAccountService {
|
||||
constructor(private readonly adminClient: SupabaseClient<Database>) {}
|
||||
|
||||
async leaveTeamAccount(params: z.infer<typeof Schema>) {
|
||||
const logger = await getLogger();
|
||||
|
||||
const ctx = {
|
||||
...params,
|
||||
name: this.namespace,
|
||||
};
|
||||
|
||||
Logger.info(ctx, 'Leaving team account');
|
||||
logger.info(ctx, 'Leaving team account...');
|
||||
|
||||
const { accountId, userId } = Schema.parse(params);
|
||||
|
||||
@@ -35,11 +37,11 @@ export class LeaveTeamAccountService {
|
||||
});
|
||||
|
||||
if (error) {
|
||||
Logger.error({ ...ctx, error }, 'Failed to leave team account');
|
||||
logger.error({ ...ctx, error }, 'Failed to leave team account');
|
||||
|
||||
throw new Error('Failed to leave team account');
|
||||
}
|
||||
|
||||
Logger.info(ctx, 'Successfully left team account');
|
||||
logger.info(ctx, 'Successfully left team account');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user