framework-do-dede 3.0.36 → 3.0.37

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.
@@ -38,6 +38,9 @@ export default class ControllerHandler {
38
38
  capturedError = this.extractError(error, httpServer);
39
39
  input.setStatus(capturedError.statusCode);
40
40
  endTime = performance.now();
41
+ if (capturedError?.custom) {
42
+ return capturedError;
43
+ }
41
44
  return {
42
45
  message: capturedError.message,
43
46
  statusCode: capturedError.statusCode
@@ -154,7 +157,8 @@ export default class ControllerHandler {
154
157
  if (error instanceof CustomServerError) {
155
158
  return {
156
159
  ...error.getCustom(),
157
- statusCode: error.getStatusCode()
160
+ statusCode: error.getStatusCode(),
161
+ custom: true
158
162
  };
159
163
  }
160
164
  const debugError = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "framework-do-dede",
3
- "version": "3.0.36",
3
+ "version": "3.0.37",
4
4
  "type": "module",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",