fix: Remove duplicate error reporting for endpoints (no-changelog) (#11959)

Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in>
This commit is contained in:
Mutasem Aldmour
2024-12-02 19:34:42 +01:00
committed by GitHub
parent f258cebe53
commit fb5cf4beea
14 changed files with 95 additions and 27 deletions

View File

@@ -1,5 +1,5 @@
import type { IUserSettings } from 'n8n-workflow';
import { ApplicationError, ErrorReporterProxy as ErrorReporter } from 'n8n-workflow';
import { ApplicationError } from 'n8n-workflow';
import { Service } from 'typedi';
import type { User, AssignableRole } from '@/databases/entities/user';
@@ -213,9 +213,8 @@ export class UserService {
),
);
} catch (error) {
ErrorReporter.error(error);
this.logger.error('Failed to create user shells', { userShells: createdUsers });
throw new InternalServerError('An error occurred during user creation');
throw new InternalServerError('An error occurred during user creation', error);
}
pendingUsersToInvite.forEach(({ email, id }) => createdUsers.set(email, id));