mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-23 17:08:34 +00:00
Fix: In TJDB the error message text not having proper column name while uploading bulk data (#12346)
* Fix: In TJDB the error message text not having proper column name while uploading bulk data * Change the variable name and removed capitalize loadsh method
This commit is contained in:
parent
b6b89c0b90
commit
246dafb64d
1 changed files with 2 additions and 2 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue