@opra/core 1.0.0-alpha.6 → 1.0.0-alpha.7
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.
|
@@ -76,11 +76,10 @@ class HttpHandler {
|
|
|
76
76
|
e = (0, wrap_exception_js_1.wrapException)(e);
|
|
77
77
|
response.status(e.statusCode || e.status || common_1.HttpStatusCode.INTERNAL_SERVER_ERROR);
|
|
78
78
|
response.contentType(common_1.MimeTypes.opra_response_json);
|
|
79
|
-
await this._sendResponse(context, new common_1.OperationResult({ errors: [e] })).finally(() => {
|
|
79
|
+
await this._sendResponse(context, new common_1.OperationResult({ errors: [e.toJSON()] })).finally(() => {
|
|
80
80
|
if (!response.finished)
|
|
81
81
|
response.end();
|
|
82
82
|
});
|
|
83
|
-
// if (!outgoing.writableEnded) await this._sendErrorResponse(context.response, [error]);
|
|
84
83
|
}
|
|
85
84
|
finally {
|
|
86
85
|
await context.emitAsync('finish');
|
|
@@ -72,11 +72,10 @@ export class HttpHandler {
|
|
|
72
72
|
e = wrapException(e);
|
|
73
73
|
response.status(e.statusCode || e.status || HttpStatusCode.INTERNAL_SERVER_ERROR);
|
|
74
74
|
response.contentType(MimeTypes.opra_response_json);
|
|
75
|
-
await this._sendResponse(context, new OperationResult({ errors: [e] })).finally(() => {
|
|
75
|
+
await this._sendResponse(context, new OperationResult({ errors: [e.toJSON()] })).finally(() => {
|
|
76
76
|
if (!response.finished)
|
|
77
77
|
response.end();
|
|
78
78
|
});
|
|
79
|
-
// if (!outgoing.writableEnded) await this._sendErrorResponse(context.response, [error]);
|
|
80
79
|
}
|
|
81
80
|
finally {
|
|
82
81
|
await context.emitAsync('finish');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opra/core",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.7",
|
|
4
4
|
"description": "Opra schema package",
|
|
5
5
|
"author": "Panates",
|
|
6
6
|
"license": "MIT",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@browsery/type-is": "^1.6.18-r2",
|
|
34
|
-
"@opra/common": "^1.0.0-alpha.
|
|
34
|
+
"@opra/common": "^1.0.0-alpha.7",
|
|
35
35
|
"@types/formidable": "^3.4.5",
|
|
36
36
|
"accepts": "^1.3.8",
|
|
37
37
|
"base64-stream": "^1.0.0",
|