@naturalcycles/db-lib 8.54.2 → 8.54.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -215,7 +215,7 @@ class CommonDao {
|
|
|
215
215
|
}
|
|
216
216
|
throwRequiredError(id, opt) {
|
|
217
217
|
const table = opt.table || this.cfg.table;
|
|
218
|
-
throw new js_lib_1.AppError(`DB row required, but not found
|
|
218
|
+
throw new js_lib_1.AppError(`DB row required, but not found in ${table}`, {
|
|
219
219
|
code: cnst_1.DBLibError.DB_ROW_REQUIRED,
|
|
220
220
|
table,
|
|
221
221
|
id,
|
|
@@ -44,7 +44,7 @@ class CommonKeyValueDao {
|
|
|
44
44
|
const [r] = await this.getByIds([id]);
|
|
45
45
|
if (!r) {
|
|
46
46
|
const { table } = this.cfg;
|
|
47
|
-
throw new js_lib_1.AppError(`DB row required, but not found
|
|
47
|
+
throw new js_lib_1.AppError(`DB row required, but not found in ${table}`, {
|
|
48
48
|
code: cnst_1.DBLibError.DB_ROW_REQUIRED,
|
|
49
49
|
table,
|
|
50
50
|
id,
|
|
@@ -56,7 +56,7 @@ class CommonKeyValueDao {
|
|
|
56
56
|
const [r] = await this.cfg.db.getByIds(this.cfg.table, [id]);
|
|
57
57
|
if (!r) {
|
|
58
58
|
const { table } = this.cfg;
|
|
59
|
-
throw new js_lib_1.AppError(`DB row required, but not found
|
|
59
|
+
throw new js_lib_1.AppError(`DB row required, but not found in ${table}`, {
|
|
60
60
|
code: cnst_1.DBLibError.DB_ROW_REQUIRED,
|
|
61
61
|
table,
|
|
62
62
|
id,
|
package/package.json
CHANGED
|
@@ -249,7 +249,7 @@ export class CommonDao<
|
|
|
249
249
|
|
|
250
250
|
private throwRequiredError(id: ID, opt: CommonDaoOptions): never {
|
|
251
251
|
const table = opt.table || this.cfg.table
|
|
252
|
-
throw new AppError(`DB row required, but not found
|
|
252
|
+
throw new AppError(`DB row required, but not found in ${table}`, {
|
|
253
253
|
code: DBLibError.DB_ROW_REQUIRED,
|
|
254
254
|
table,
|
|
255
255
|
id,
|
|
@@ -90,7 +90,7 @@ export class CommonKeyValueDao<T> {
|
|
|
90
90
|
|
|
91
91
|
if (!r) {
|
|
92
92
|
const { table } = this.cfg
|
|
93
|
-
throw new AppError(`DB row required, but not found
|
|
93
|
+
throw new AppError(`DB row required, but not found in ${table}`, {
|
|
94
94
|
code: DBLibError.DB_ROW_REQUIRED,
|
|
95
95
|
table,
|
|
96
96
|
id,
|
|
@@ -105,7 +105,7 @@ export class CommonKeyValueDao<T> {
|
|
|
105
105
|
|
|
106
106
|
if (!r) {
|
|
107
107
|
const { table } = this.cfg
|
|
108
|
-
throw new AppError(`DB row required, but not found
|
|
108
|
+
throw new AppError(`DB row required, but not found in ${table}`, {
|
|
109
109
|
code: DBLibError.DB_ROW_REQUIRED,
|
|
110
110
|
table,
|
|
111
111
|
id,
|