framework-do-dede 3.0.36 → 3.0.38
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,10 @@ 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
|
+
const removingCustom = { ...capturedError, custom: undefined };
|
|
43
|
+
return removingCustom;
|
|
44
|
+
}
|
|
41
45
|
return {
|
|
42
46
|
message: capturedError.message,
|
|
43
47
|
statusCode: capturedError.statusCode
|
|
@@ -154,7 +158,8 @@ export default class ControllerHandler {
|
|
|
154
158
|
if (error instanceof CustomServerError) {
|
|
155
159
|
return {
|
|
156
160
|
...error.getCustom(),
|
|
157
|
-
statusCode: error.getStatusCode()
|
|
161
|
+
statusCode: error.getStatusCode(),
|
|
162
|
+
custom: true
|
|
158
163
|
};
|
|
159
164
|
}
|
|
160
165
|
const debugError = {
|