@ruiapp/rapid-core 0.8.12 → 0.8.13
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.
- package/dist/index.js +4 -2
- package/dist/server.d.ts +1 -1
- package/package.json +1 -1
- package/src/server.ts +4 -2
package/dist/index.js
CHANGED
|
@@ -4658,12 +4658,14 @@ class RapidServer {
|
|
|
4658
4658
|
throw err;
|
|
4659
4659
|
}
|
|
4660
4660
|
}
|
|
4661
|
-
async tryQueryDatabaseObject(sql, params, client) {
|
|
4661
|
+
async tryQueryDatabaseObject(sql, params, client, silent) {
|
|
4662
4662
|
try {
|
|
4663
4663
|
return await this.queryDatabaseObject(sql, params, client);
|
|
4664
4664
|
}
|
|
4665
4665
|
catch (err) {
|
|
4666
|
-
|
|
4666
|
+
if (!silent) {
|
|
4667
|
+
this.#logger.error("Failed to query database object.", { errorMessage: err.message, sql, params });
|
|
4668
|
+
}
|
|
4667
4669
|
}
|
|
4668
4670
|
return [];
|
|
4669
4671
|
}
|
package/dist/server.d.ts
CHANGED
|
@@ -53,7 +53,7 @@ export declare class RapidServer implements IRpdServer {
|
|
|
53
53
|
registerFacilityFactory(factory: FacilityFactory): void;
|
|
54
54
|
getFacility<TFacility = any, TOptions = any>(name: string, options?: TOptions, nullIfUnknownFacility?: boolean): Promise<TFacility>;
|
|
55
55
|
queryDatabaseObject(sql: string, params?: unknown[] | Record<string, unknown>, client?: IDatabaseClient): Promise<any[]>;
|
|
56
|
-
tryQueryDatabaseObject(sql: string, params?: unknown[] | Record<string, unknown>, client?: IDatabaseClient): Promise<any[]>;
|
|
56
|
+
tryQueryDatabaseObject(sql: string, params?: unknown[] | Record<string, unknown>, client?: IDatabaseClient, silent?: boolean): Promise<any[]>;
|
|
57
57
|
get middlewares(): any[];
|
|
58
58
|
handleRequest(request: Request, next: Next): Promise<Response>;
|
|
59
59
|
beforeRunRouteActions(handlerContext: ActionHandlerContext): Promise<void>;
|
package/package.json
CHANGED
package/src/server.ts
CHANGED
|
@@ -419,11 +419,13 @@ export class RapidServer implements IRpdServer {
|
|
|
419
419
|
}
|
|
420
420
|
}
|
|
421
421
|
|
|
422
|
-
async tryQueryDatabaseObject(sql: string, params?: unknown[] | Record<string, unknown>, client?: IDatabaseClient): Promise<any[]> {
|
|
422
|
+
async tryQueryDatabaseObject(sql: string, params?: unknown[] | Record<string, unknown>, client?: IDatabaseClient, silent?: boolean): Promise<any[]> {
|
|
423
423
|
try {
|
|
424
424
|
return await this.queryDatabaseObject(sql, params, client);
|
|
425
425
|
} catch (err) {
|
|
426
|
-
|
|
426
|
+
if (!silent) {
|
|
427
|
+
this.#logger.error("Failed to query database object.", { errorMessage: err.message, sql, params });
|
|
428
|
+
}
|
|
427
429
|
}
|
|
428
430
|
|
|
429
431
|
return [];
|