@marblejs/http
Advanced tools
Comparing version 4.0.0-rc.2 to 4.0.0-rc.3
@@ -28,3 +28,2 @@ import { CoreError } from '@marblejs/core'; | ||
export declare const errorNotBoundToRequestErrorFactory: (error: Error) => CoreError; | ||
export declare const getErrorMessage: (error: unknown) => string; | ||
//# sourceMappingURL=http.error.model.d.ts.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getErrorMessage = exports.errorNotBoundToRequestErrorFactory = exports.responseNotBoundToRequestErrorFactory = exports.unexpectedErrorWhileSendingResponseFactory = exports.isURIError = exports.isHttpRequestError = exports.isHttpError = exports.HttpRequestError = exports.HttpError = exports.HttpErrorType = void 0; | ||
exports.errorNotBoundToRequestErrorFactory = exports.responseNotBoundToRequestErrorFactory = exports.unexpectedErrorWhileSendingResponseFactory = exports.isURIError = exports.isHttpRequestError = exports.isHttpError = exports.HttpRequestError = exports.HttpError = exports.HttpErrorType = void 0; | ||
const chalk = require("chalk"); | ||
@@ -52,7 +52,1 @@ const core_1 = require("@marblejs/core"); | ||
exports.errorNotBoundToRequestErrorFactory = errorNotBoundToRequestErrorFactory; | ||
const getErrorMessage = (error) => error instanceof Error | ||
? error.message | ||
: (0, utils_1.isString)(error) | ||
? error | ||
: JSON.stringify(error); | ||
exports.getErrorMessage = getErrorMessage; |
@@ -128,3 +128,3 @@ "use strict"; | ||
else | ||
httpError = new http_error_model_1.HttpError(`Internal server error: ${(0, http_error_model_1.getErrorMessage)(error)}`, http_interface_1.HttpStatus.INTERNAL_SERVER_ERROR); | ||
httpError = new http_error_model_1.HttpError(`Internal server error: ${(0, utils_1.getErrorMessage)(error)}`, http_interface_1.HttpStatus.INTERNAL_SERVER_ERROR); | ||
errorSubject.next({ request, error: httpError }); | ||
@@ -131,0 +131,0 @@ } |
{ | ||
"name": "@marblejs/http", | ||
"version": "4.0.0-rc.2", | ||
"version": "4.0.0-rc.3", | ||
"description": "HTTP module for Marble.js", | ||
@@ -49,3 +49,3 @@ "main": "./dist/index.js", | ||
"devDependencies": { | ||
"@marblejs/core": "^4.0.0-rc.2", | ||
"@marblejs/core": "^4.0.0-rc.3", | ||
"@types/file-type": "^5.2.1", | ||
@@ -57,3 +57,3 @@ "@types/mime": "^2.0.1" | ||
}, | ||
"gitHead": "086fe663a428304060a4d32872814bc329bee649" | ||
"gitHead": "22ba0ffda1e118822ccad389edd416126732d210" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
129162
1946