@volontariapp/errors-nest 0.6.6 → 0.7.0-next.20260412152207

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.
@@ -0,0 +1,6 @@
1
+ import { InternalServerError } from '@volontariapp/errors';
2
+ export declare const DATABASE_ERROR: (operation: string, details: string) => InternalServerError;
3
+ export declare const DATABASE_CONNECTION_ERROR: (message: string) => InternalServerError;
4
+ export declare const DATABASE_TRANSACTION_ERROR: (message: string) => InternalServerError;
5
+ export declare const DATABASE_QUERY_ERROR: (message: string) => InternalServerError;
6
+ //# sourceMappingURL=database.errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"database.errors.d.ts","sourceRoot":"","sources":["../../src/errors/database.errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAE3D,eAAO,MAAM,cAAc,cAAe,MAAM,WAAW,MAAM,wBAI9D,CAAC;AAEJ,eAAO,MAAM,yBAAyB,YAAa,MAAM,wBAItD,CAAC;AAEJ,eAAO,MAAM,0BAA0B,YAAa,MAAM,wBAIvD,CAAC;AAEJ,eAAO,MAAM,oBAAoB,YAAa,MAAM,wBAIjD,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { InternalServerError } from '@volontariapp/errors';
2
+ export const DATABASE_ERROR = (operation, details) => new InternalServerError(`An unexpected database error occurred during ${operation}. Details: ${details}. Please check the database connection and the integrity of the data being processed.`, 'DATABASE_ERROR');
3
+ export const DATABASE_CONNECTION_ERROR = (message) => new InternalServerError(`Failed to establish a connection with the database. ${message}. Please verify that the database server is running and accessible from the application network.`, 'DATABASE_CONNECTION_ERROR');
4
+ export const DATABASE_TRANSACTION_ERROR = (message) => new InternalServerError(`A critical error occurred while processing a database transaction. ${message}. The transaction has been rolled back to ensure data consistency.`, 'DATABASE_TRANSACTION_ERROR');
5
+ export const DATABASE_QUERY_ERROR = (message) => new InternalServerError(`The database query failed to execute correctly. ${message}. This could be due to a syntax error or a constraint violation in the query.`, 'DATABASE_QUERY_ERROR');
6
+ //# sourceMappingURL=database.errors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"database.errors.js","sourceRoot":"","sources":["../../src/errors/database.errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAE3D,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,SAAiB,EAAE,OAAe,EAAE,EAAE,CACnE,IAAI,mBAAmB,CACrB,gDAAgD,SAAS,cAAc,OAAO,uFAAuF,EACrK,gBAAgB,CACjB,CAAC;AAEJ,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,OAAe,EAAE,EAAE,CAC3D,IAAI,mBAAmB,CACrB,uDAAuD,OAAO,kGAAkG,EAChK,2BAA2B,CAC5B,CAAC;AAEJ,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,OAAe,EAAE,EAAE,CAC5D,IAAI,mBAAmB,CACrB,sEAAsE,OAAO,oEAAoE,EACjJ,4BAA4B,CAC7B,CAAC;AAEJ,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,OAAe,EAAE,EAAE,CACtD,IAAI,mBAAmB,CACrB,mDAAmD,OAAO,+EAA+E,EACzI,sBAAsB,CACvB,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { NotFoundError, ConflictError, BadRequestError } from '@volontariapp/errors';
2
+ export declare const EVENT_NOT_FOUND: (id: string) => NotFoundError;
3
+ export declare const TAG_NOT_FOUND: (id: string) => NotFoundError;
4
+ export declare const TAG_ALREADY_EXISTS: (slug: string) => ConflictError;
5
+ export declare const REQUIREMENT_NOT_FOUND: (id: string) => NotFoundError;
6
+ export declare const INVALID_LOCATION: (details: string) => BadRequestError;
7
+ //# sourceMappingURL=event.errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"event.errors.d.ts","sourceRoot":"","sources":["../../src/errors/event.errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAErF,eAAO,MAAM,eAAe,OAAQ,MAAM,kBAAuD,CAAC;AAElG,eAAO,MAAM,aAAa,OAAQ,MAAM,kBAAqD,CAAC;AAE9F,eAAO,MAAM,kBAAkB,SAAU,MAAM,kBACY,CAAC;AAE5D,eAAO,MAAM,qBAAqB,OAAQ,MAAM,kBACU,CAAC;AAE3D,eAAO,MAAM,gBAAgB,YAAa,MAAM,oBAC+B,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { NotFoundError, ConflictError, BadRequestError } from '@volontariapp/errors';
2
+ export const EVENT_NOT_FOUND = (id) => new NotFoundError(`Event with id ${id} not found`);
3
+ export const TAG_NOT_FOUND = (id) => new NotFoundError(`Tag with id ${id} not found`);
4
+ export const TAG_ALREADY_EXISTS = (slug) => new ConflictError(`Tag with slug ${slug} already exists`);
5
+ export const REQUIREMENT_NOT_FOUND = (id) => new NotFoundError(`Requirement with id ${id} not found`);
6
+ export const INVALID_LOCATION = (details) => new BadRequestError(`Invalid location: ${details}`, 'INVALID_EVENT_LOCATION');
7
+ //# sourceMappingURL=event.errors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"event.errors.js","sourceRoot":"","sources":["../../src/errors/event.errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAErF,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,EAAU,EAAE,EAAE,CAAC,IAAI,aAAa,CAAC,iBAAiB,EAAE,YAAY,CAAC,CAAC;AAElG,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,EAAU,EAAE,EAAE,CAAC,IAAI,aAAa,CAAC,eAAe,EAAE,YAAY,CAAC,CAAC;AAE9F,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,IAAY,EAAE,EAAE,CACjD,IAAI,aAAa,CAAC,iBAAiB,IAAI,iBAAiB,CAAC,CAAC;AAE5D,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,EAAU,EAAE,EAAE,CAClD,IAAI,aAAa,CAAC,uBAAuB,EAAE,YAAY,CAAC,CAAC;AAE3D,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,OAAe,EAAE,EAAE,CAClD,IAAI,eAAe,CAAC,qBAAqB,OAAO,EAAE,EAAE,wBAAwB,CAAC,CAAC"}
@@ -1,4 +1,6 @@
1
1
  export * from './auth.errors.js';
2
2
  export * from './bridge.errors.js';
3
3
  export * from './health-check.errors.js';
4
+ export * from './event.errors.js';
5
+ export * from './database.errors.js';
4
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/errors/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/errors/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC;AACzC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC"}
@@ -1,4 +1,6 @@
1
1
  export * from './auth.errors.js';
2
2
  export * from './bridge.errors.js';
3
3
  export * from './health-check.errors.js';
4
+ export * from './event.errors.js';
5
+ export * from './database.errors.js';
4
6
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/errors/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/errors/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC;AACzC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@volontariapp/errors-nest",
3
- "version": "0.6.6",
3
+ "version": "0.7.0-next.20260412152207",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "provenance": true