@valentine-efagene/qshelter-common 2.0.28 → 2.0.29

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.
@@ -8,6 +8,7 @@ export function errorHandler(err, req, res, next) {
8
8
  if (err instanceof ZodError) {
9
9
  return res.status(400).json({
10
10
  success: false,
11
+ message: 'Validation Error',
11
12
  error: 'Validation Error',
12
13
  details: err.issues,
13
14
  });
@@ -15,12 +16,14 @@ export function errorHandler(err, req, res, next) {
15
16
  if (err instanceof AppError) {
16
17
  return res.status(err.statusCode).json({
17
18
  success: false,
19
+ message: err.message,
18
20
  error: err.message,
19
21
  });
20
22
  }
21
23
  console.error('Unhandled error:', err);
22
24
  return res.status(500).json({
23
25
  success: false,
26
+ message: 'Internal Server Error',
24
27
  error: 'Internal Server Error',
25
28
  });
26
29
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@valentine-efagene/qshelter-common",
3
- "version": "2.0.28",
3
+ "version": "2.0.29",
4
4
  "description": "Shared database schemas and utilities for QShelter services",
5
5
  "main": "dist/src/index.js",
6
6
  "types": "dist/src/index.d.ts",