feat: Make tags unique, clean up searchability of product entities (#7014)

This commit is contained in:
Stevche Radevski
2024-04-08 17:55:40 +02:00
committed by GitHub
parent 9b5e025863
commit db2f0ef53f
21 changed files with 105 additions and 299 deletions

View File

@@ -24,7 +24,7 @@ export const dbErrorMapper = (err: Error) => {
throw new MedusaError(
MedusaError.Types.INVALID_DATA,
`${upperCaseFirst(info.table)} with ${info.keys
`${upperCaseFirst(info.table.split("_").join(" "))} with ${info.keys
.map((key, i) => `${key}: ${info.values[i]}`)
.join(", ")} already exists.`
)
@@ -37,7 +37,7 @@ export const dbErrorMapper = (err: Error) => {
throw new MedusaError(
MedusaError.Types.INVALID_DATA,
`Cannot set field '${(err as any).column}' of ${upperCaseFirst(
(err as any).table
(err as any).table.split("_").join(" ")
)} to null`
)
}