@candlerip/shared3 0.0.110 → 0.0.111
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +1 -1
- package/src/backend/database/model/error-log/index.d.ts +2 -0
- package/src/backend/database/model/error-log/index.js +2 -0
- package/src/backend/database/model/error-log/type.d.ts +7 -0
- package/src/backend/database/model/error-log/type.js +1 -0
- package/src/backend/database/model/error-log/util.d.ts +7 -0
- package/src/backend/database/model/error-log/util.js +5 -0
- package/src/backend/database/model/index.d.ts +1 -0
- package/src/backend/database/model/index.js +1 -0
- package/src/backend/database/mutation/error-log/create-error-log/index.d.ts +1 -0
- package/src/backend/database/mutation/error-log/create-error-log/index.js +1 -0
- package/src/backend/database/mutation/error-log/create-error-log/type.d.ts +7 -0
- package/src/backend/database/mutation/error-log/create-error-log/type.js +1 -0
- package/src/backend/database/mutation/error-log/create-error-log/util.d.ts +2 -0
- package/src/backend/database/mutation/error-log/create-error-log/util.js +15 -0
- package/src/backend/database/mutation/error-log/index.d.ts +1 -0
- package/src/backend/database/mutation/error-log/index.js +1 -0
- package/src/backend/database/mutation/index.d.ts +1 -0
- package/src/backend/database/mutation/index.js +1 -0
package/package.json
CHANGED
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import * as mongoose from 'mongoose';
|
2
|
+
import { ErrorLog } from './type.js';
|
3
|
+
export declare const ErrorLogModel: mongoose.Model<ErrorLog & mongoose.Document<unknown, any, any>, {}, {}, {}, mongoose.Document<unknown, {}, ErrorLog & mongoose.Document<unknown, any, any>> & ErrorLog & mongoose.Document<unknown, any, any> & Required<{
|
4
|
+
_id: string;
|
5
|
+
}> & {
|
6
|
+
__v: number;
|
7
|
+
}, any>;
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './util.js';
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './util.js';
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import { customErrorWorker } from '../../../../../error/index.js';
|
2
|
+
import { ErrorLogModel } from '../../../model/error-log/index.js';
|
3
|
+
export const createErrorLog = async (customError) => {
|
4
|
+
let data;
|
5
|
+
const { composeCustomError } = customErrorWorker({ customError });
|
6
|
+
try {
|
7
|
+
data = await ErrorLogModel.create({ customError });
|
8
|
+
}
|
9
|
+
catch (err) {
|
10
|
+
return composeCustomError('Create error log failed', { err });
|
11
|
+
}
|
12
|
+
return {
|
13
|
+
data,
|
14
|
+
};
|
15
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './create-error-log/index.js';
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './create-error-log/index.js';
|