@aeriajs/node-http 0.0.68 → 0.0.70

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.
package/dist/driver.js CHANGED
@@ -39,8 +39,8 @@ const abstractResponse = (response) => {
39
39
  end: (value) => {
40
40
  if (typeof value === 'object' && !(value instanceof Buffer)) {
41
41
  if (!response.headersSent) {
42
- if ((0, common_1.isError)(value)) {
43
- const error = (0, common_1.unwrapError)(value);
42
+ if ((0, common_1.isEndpointError)(value)) {
43
+ const { error } = value;
44
44
  if (error.httpStatus) {
45
45
  response.writeHead(error.httpStatus, {
46
46
  'content-type': 'application/json',
package/dist/driver.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  import { ERROR_SYMBOL_DESCRIPTION } from "@aeriajs/types";
3
- import { isError, unwrapError } from "@aeriajs/common";
3
+ import { isEndpointError } from "@aeriajs/common";
4
4
  import * as http from "http";
5
5
  import { parse as parseUrl } from "url";
6
6
  const getBody = async ($req) => {
@@ -32,8 +32,8 @@ export const abstractResponse = (response) => {
32
32
  end: (value) => {
33
33
  if (typeof value === "object" && !(value instanceof Buffer)) {
34
34
  if (!response.headersSent) {
35
- if (isError(value)) {
36
- const error = unwrapError(value);
35
+ if (isEndpointError(value)) {
36
+ const { error } = value;
37
37
  if (error.httpStatus) {
38
38
  response.writeHead(error.httpStatus, {
39
39
  "content-type": "application/json"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aeriajs/node-http",
3
- "version": "0.0.68",
3
+ "version": "0.0.70",
4
4
  "description": "## Installation",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -25,7 +25,7 @@
25
25
  "@aeriajs/http": "link:../http"
26
26
  },
27
27
  "peerDependencies": {
28
- "@aeriajs/http": "^0.0.68"
28
+ "@aeriajs/http": "^0.0.70"
29
29
  },
30
30
  "scripts": {
31
31
  "test": "echo skipping",