@yopdev/dev-server 1.3.17 → 1.3.19

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.
@@ -71,7 +71,7 @@ var LambdaHttpProxy = /** @class */ (function () {
71
71
  return [2 /*return*/, lambdaHandler(proxyEvent)
72
72
  .then(function (lambda) {
73
73
  var _a, _b, _c, _d, _e, _f;
74
- return (0, responses_1.writeResponse)(response, lambda.statusCode, lambda.body, (_c = (_b = (_a = lambda.headers) === null || _a === void 0 ? void 0 : _a['Content-Type']) === null || _b === void 0 ? void 0 : _b.toString()) !== null && _c !== void 0 ? _c : undefined, (_f = (_e = (_d = lambda.headers) === null || _d === void 0 ? void 0 : _d['Location']) === null || _e === void 0 ? void 0 : _e.toString()) !== null && _f !== void 0 ? _f : undefined);
74
+ return (0, responses_1.writeResponse)(response, lambda.statusCode, lambda.body, (_c = (_b = (_a = lambda.headers) === null || _a === void 0 ? void 0 : _a['content-type']) === null || _b === void 0 ? void 0 : _b.toString()) !== null && _c !== void 0 ? _c : undefined, (_f = (_e = (_d = lambda.headers) === null || _d === void 0 ? void 0 : _d['location']) === null || _e === void 0 ? void 0 : _e.toString()) !== null && _f !== void 0 ? _f : undefined);
75
75
  })
76
76
  .catch(function (e) {
77
77
  _this.LOGGER.error(e, 'request failed to execute');
@@ -1,4 +1,4 @@
1
1
  /// <reference types="node" />
2
2
  import { ServerResponse } from 'http';
3
- export declare function internalServerError(res: ServerResponse, body: string): void;
3
+ export declare function internalServerError(res: ServerResponse, body: any): void;
4
4
  export declare function writeResponse(res: ServerResponse, statusCode: number, body: string, contentType?: string, location?: string): void;
@@ -1,8 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.writeResponse = exports.internalServerError = void 0;
4
+ var logging_1 = require("@yopdev/logging");
5
+ var LOG = logging_1.LoggerFactory.create('RESPONSES');
4
6
  function internalServerError(res, body) {
5
- return writeResponse(res, 500, body);
7
+ LOG.error(body, 'internal server error handled');
8
+ return writeResponse(res, 500, 'internal server error. check system logs');
6
9
  }
7
10
  exports.internalServerError = internalServerError;
8
11
  function writeResponse(res, statusCode, body, contentType, location) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yopdev/dev-server",
3
- "version": "1.3.17",
3
+ "version": "1.3.19",
4
4
  "scripts": {
5
5
  "compile": "tsc",
6
6
  "pretest": "npm run compile",