diff --git a/server/src/modules/tooljet-db/types.ts b/server/src/modules/tooljet-db/types.ts index 73b72013aa..86f0f4ec8c 100644 --- a/server/src/modules/tooljet-db/types.ts +++ b/server/src/modules/tooljet-db/types.ts @@ -1,6 +1,5 @@ import { QueryFailedError } from 'typeorm'; import { InternalTable } from 'src/entities/internal_table.entity'; -import { capitalize } from 'lodash'; export const TJDB = { character_varying: 'character varying' as const, @@ -150,10 +149,11 @@ export class TooljetDatabaseError extends QueryFailedError { } toString(): string { + const capitalizeSentence = (str: string) => str.charAt(0).toUpperCase() + str.slice(1); const errorMessage = errorCodeMapping[this.code]?.[this.context.origin] || errorCodeMapping[this.code]?.['default'] || - capitalize(this.message); + capitalizeSentence(this.message); return this.replaceErrorPlaceholders(errorMessage); }