@pristine-ts/networking 2.0.3 → 2.0.5

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.
Files changed (114) hide show
  1. package/dist/lib/cjs/errors/errors.js +1 -7
  2. package/dist/lib/cjs/errors/errors.js.map +1 -1
  3. package/dist/lib/cjs/errors/method-router-adding.error.js +7 -12
  4. package/dist/lib/cjs/errors/method-router-adding.error.js.map +1 -1
  5. package/dist/lib/cjs/errors/networking-error-code.enum.js +16 -0
  6. package/dist/lib/cjs/errors/networking-error-code.enum.js.map +1 -0
  7. package/dist/lib/cjs/errors/path-router-adding.error.js +7 -11
  8. package/dist/lib/cjs/errors/path-router-adding.error.js.map +1 -1
  9. package/dist/lib/cjs/errors/path-router-instantiation.error.js +5 -9
  10. package/dist/lib/cjs/errors/path-router-instantiation.error.js.map +1 -1
  11. package/dist/lib/cjs/errors/request-handling.error.js +4 -8
  12. package/dist/lib/cjs/errors/request-handling.error.js.map +1 -1
  13. package/dist/lib/cjs/handlers/request.event-handler.js +2 -8
  14. package/dist/lib/cjs/handlers/request.event-handler.js.map +1 -1
  15. package/dist/lib/cjs/interceptors/body-mapping.request-interceptor.js +7 -0
  16. package/dist/lib/cjs/interceptors/body-mapping.request-interceptor.js.map +1 -1
  17. package/dist/lib/cjs/interceptors/default-content-type-response-header.interceptor.js +7 -0
  18. package/dist/lib/cjs/interceptors/default-content-type-response-header.interceptor.js.map +1 -1
  19. package/dist/lib/cjs/interceptors/interceptors.js +0 -1
  20. package/dist/lib/cjs/interceptors/interceptors.js.map +1 -1
  21. package/dist/lib/cjs/interceptors/request-body-converter.interceptor.js +10 -4
  22. package/dist/lib/cjs/interceptors/request-body-converter.interceptor.js.map +1 -1
  23. package/dist/lib/cjs/interceptors/response-headers.interceptor.js +10 -0
  24. package/dist/lib/cjs/interceptors/response-headers.interceptor.js.map +1 -1
  25. package/dist/lib/cjs/networking.module.js +1 -11
  26. package/dist/lib/cjs/networking.module.js.map +1 -1
  27. package/dist/lib/cjs/responders/http-error.responder.js +108 -0
  28. package/dist/lib/cjs/responders/http-error.responder.js.map +1 -0
  29. package/dist/lib/cjs/router.js +44 -25
  30. package/dist/lib/cjs/router.js.map +1 -1
  31. package/dist/lib/cjs/tsconfig.cjs.tsbuildinfo +1 -1
  32. package/dist/lib/esm/errors/errors.js +1 -7
  33. package/dist/lib/esm/errors/errors.js.map +1 -1
  34. package/dist/lib/esm/errors/method-router-adding.error.js +8 -13
  35. package/dist/lib/esm/errors/method-router-adding.error.js.map +1 -1
  36. package/dist/lib/esm/errors/networking-error-code.enum.js +13 -0
  37. package/dist/lib/esm/errors/networking-error-code.enum.js.map +1 -0
  38. package/dist/lib/esm/errors/path-router-adding.error.js +8 -12
  39. package/dist/lib/esm/errors/path-router-adding.error.js.map +1 -1
  40. package/dist/lib/esm/errors/path-router-instantiation.error.js +6 -10
  41. package/dist/lib/esm/errors/path-router-instantiation.error.js.map +1 -1
  42. package/dist/lib/esm/errors/request-handling.error.js +5 -9
  43. package/dist/lib/esm/errors/request-handling.error.js.map +1 -1
  44. package/dist/lib/esm/handlers/request.event-handler.js +2 -8
  45. package/dist/lib/esm/handlers/request.event-handler.js.map +1 -1
  46. package/dist/lib/esm/interceptors/body-mapping.request-interceptor.js +8 -1
  47. package/dist/lib/esm/interceptors/body-mapping.request-interceptor.js.map +1 -1
  48. package/dist/lib/esm/interceptors/default-content-type-response-header.interceptor.js +8 -1
  49. package/dist/lib/esm/interceptors/default-content-type-response-header.interceptor.js.map +1 -1
  50. package/dist/lib/esm/interceptors/interceptors.js +0 -1
  51. package/dist/lib/esm/interceptors/interceptors.js.map +1 -1
  52. package/dist/lib/esm/interceptors/request-body-converter.interceptor.js +11 -5
  53. package/dist/lib/esm/interceptors/request-body-converter.interceptor.js.map +1 -1
  54. package/dist/lib/esm/interceptors/response-headers.interceptor.js +11 -1
  55. package/dist/lib/esm/interceptors/response-headers.interceptor.js.map +1 -1
  56. package/dist/lib/esm/networking.module.js +1 -11
  57. package/dist/lib/esm/networking.module.js.map +1 -1
  58. package/dist/lib/esm/responders/http-error.responder.js +105 -0
  59. package/dist/lib/esm/responders/http-error.responder.js.map +1 -0
  60. package/dist/lib/esm/router.js +45 -26
  61. package/dist/lib/esm/router.js.map +1 -1
  62. package/dist/lib/esm/tsconfig.tsbuildinfo +1 -1
  63. package/dist/types/errors/errors.d.ts +1 -7
  64. package/dist/types/errors/method-router-adding.error.d.ts +2 -2
  65. package/dist/types/errors/networking-error-code.enum.d.ts +11 -0
  66. package/dist/types/errors/path-router-adding.error.d.ts +2 -2
  67. package/dist/types/errors/path-router-instantiation.error.d.ts +2 -2
  68. package/dist/types/errors/request-handling.error.d.ts +2 -2
  69. package/dist/types/handlers/request.event-handler.d.ts +2 -3
  70. package/dist/types/interceptors/interceptors.d.ts +0 -1
  71. package/dist/types/networking.module.d.ts +1 -0
  72. package/dist/types/responders/http-error.responder.d.ts +43 -0
  73. package/dist/types/router.d.ts +3 -1
  74. package/package.json +7 -7
  75. package/dist/lib/cjs/errors/bad-request.http-error.js +0 -20
  76. package/dist/lib/cjs/errors/bad-request.http-error.js.map +0 -1
  77. package/dist/lib/cjs/errors/forbidden.http-error.js +0 -19
  78. package/dist/lib/cjs/errors/forbidden.http-error.js.map +0 -1
  79. package/dist/lib/cjs/errors/http.error.js +0 -25
  80. package/dist/lib/cjs/errors/http.error.js.map +0 -1
  81. package/dist/lib/cjs/errors/invalid-body.http-error.js +0 -19
  82. package/dist/lib/cjs/errors/invalid-body.http-error.js.map +0 -1
  83. package/dist/lib/cjs/errors/not-found.http-error.js +0 -19
  84. package/dist/lib/cjs/errors/not-found.http-error.js.map +0 -1
  85. package/dist/lib/cjs/errors/request-interception-execution.error.js +0 -21
  86. package/dist/lib/cjs/errors/request-interception-execution.error.js.map +0 -1
  87. package/dist/lib/cjs/errors/response-interception-execution.error.js +0 -23
  88. package/dist/lib/cjs/errors/response-interception-execution.error.js.map +0 -1
  89. package/dist/lib/cjs/interceptors/error-response-sanitizer.request-interceptor.js +0 -54
  90. package/dist/lib/cjs/interceptors/error-response-sanitizer.request-interceptor.js.map +0 -1
  91. package/dist/lib/esm/errors/bad-request.http-error.js +0 -16
  92. package/dist/lib/esm/errors/bad-request.http-error.js.map +0 -1
  93. package/dist/lib/esm/errors/forbidden.http-error.js +0 -15
  94. package/dist/lib/esm/errors/forbidden.http-error.js.map +0 -1
  95. package/dist/lib/esm/errors/http.error.js +0 -21
  96. package/dist/lib/esm/errors/http.error.js.map +0 -1
  97. package/dist/lib/esm/errors/invalid-body.http-error.js +0 -15
  98. package/dist/lib/esm/errors/invalid-body.http-error.js.map +0 -1
  99. package/dist/lib/esm/errors/not-found.http-error.js +0 -15
  100. package/dist/lib/esm/errors/not-found.http-error.js.map +0 -1
  101. package/dist/lib/esm/errors/request-interception-execution.error.js +0 -17
  102. package/dist/lib/esm/errors/request-interception-execution.error.js.map +0 -1
  103. package/dist/lib/esm/errors/response-interception-execution.error.js +0 -19
  104. package/dist/lib/esm/errors/response-interception-execution.error.js.map +0 -1
  105. package/dist/lib/esm/interceptors/error-response-sanitizer.request-interceptor.js +0 -51
  106. package/dist/lib/esm/interceptors/error-response-sanitizer.request-interceptor.js.map +0 -1
  107. package/dist/types/errors/bad-request.http-error.d.ts +0 -9
  108. package/dist/types/errors/forbidden.http-error.d.ts +0 -8
  109. package/dist/types/errors/http.error.d.ts +0 -11
  110. package/dist/types/errors/invalid-body.http-error.d.ts +0 -8
  111. package/dist/types/errors/not-found.http-error.d.ts +0 -8
  112. package/dist/types/errors/request-interception-execution.error.d.ts +0 -7
  113. package/dist/types/errors/response-interception-execution.error.d.ts +0 -7
  114. package/dist/types/interceptors/error-response-sanitizer.request-interceptor.d.ts +0 -11
@@ -1,11 +1,5 @@
1
- export * from "./bad-request.http-error";
2
- export * from "./forbidden.http-error";
3
- export * from "./http.error";
4
- export * from "./invalid-body.http-error";
5
1
  export * from "./method-router-adding.error";
6
- export * from "./not-found.http-error";
2
+ export * from "./networking-error-code.enum";
7
3
  export * from "./path-router-adding.error";
8
4
  export * from "./path-router-instantiation.error";
9
5
  export * from "./request-handling.error";
10
- export * from "./request-interception-execution.error";
11
- export * from "./response-interception-execution.error";
@@ -1,10 +1,10 @@
1
- import { HttpMethod, LoggableError } from "@pristine-ts/common";
1
+ import { HttpMethod, PristineError } from "@pristine-ts/common";
2
2
  import { Route } from "../models/route";
3
3
  import { MethodRouterNode } from "../nodes/method-router.node";
4
4
  /**
5
5
  * This Error is thrown when there's an error that happens when the networking is being initialized.
6
6
  * It is thrown when trying to add a child node to a MethodRouterNode, since a MethodRouterNode is a leaf it cannot have any children.
7
7
  */
8
- export declare class MethodRouterAddingError extends LoggableError {
8
+ export declare class MethodRouterAddingError extends PristineError {
9
9
  constructor(message: string, splitPaths: string[], method: HttpMethod | string, route: Route, methodRouterNode: MethodRouterNode);
10
10
  }
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Error-code catalog owned by `@pristine-ts/networking`. Surfaced via
3
+ * `PristineErrorOptions.code` (typed `PristineErrorCode | string`, so any enum value is
4
+ * accepted).
5
+ *
6
+ * Codes here describe HTTP-layer failures specific to the networking module — body
7
+ * parsing/validation, request mapping, etc.
8
+ */
9
+ export declare enum NetworkingErrorCode {
10
+ InvalidBody = "INVALID_BODY"
11
+ }
@@ -1,10 +1,10 @@
1
- import { HttpMethod, LoggableError } from "@pristine-ts/common";
1
+ import { HttpMethod, PristineError } from "@pristine-ts/common";
2
2
  import { PathRouterNode } from "../nodes/path-router.node";
3
3
  import { Route } from "../models/route";
4
4
  /**
5
5
  * This Error is thrown when there's an error that happens when the networking is being initialized.
6
6
  * It is thrown when an error occurs when trying to add a child node to a PathRouterNode.
7
7
  */
8
- export declare class PathRouterAddingError extends LoggableError {
8
+ export declare class PathRouterAddingError extends PristineError {
9
9
  constructor(message: string, splitPaths: string[], method: HttpMethod | string, route: Route, pathRouterNode: PathRouterNode);
10
10
  }
@@ -1,9 +1,9 @@
1
- import { LoggableError } from "@pristine-ts/common";
1
+ import { PristineError } from "@pristine-ts/common";
2
2
  import { PathRouterNode } from "../nodes/path-router.node";
3
3
  /**
4
4
  * This Error is thrown when there's an error that happens when the networking is being initialized.
5
5
  * It is thrown when an error occurs when trying to instantiate a PathRouterNode.
6
6
  */
7
- export declare class PathRouterInstantiationError extends LoggableError {
7
+ export declare class PathRouterInstantiationError extends PristineError {
8
8
  constructor(message: string, path: string, parent?: PathRouterNode);
9
9
  }
@@ -1,7 +1,7 @@
1
- import { LoggableError, Request } from "@pristine-ts/common";
1
+ import { PristineError, Request } from "@pristine-ts/common";
2
2
  /**
3
3
  * This Error is thrown when there's an error that happens while handling a request.
4
4
  */
5
- export declare class RequestHandlingError extends LoggableError {
5
+ export declare class RequestHandlingError extends PristineError {
6
6
  constructor(message: string, request: Request);
7
7
  }
@@ -3,15 +3,14 @@ import { DependencyContainer } from "tsyringe";
3
3
  import { RouterInterface } from "../interfaces/router.interface";
4
4
  import { Request, Response } from "@pristine-ts/common";
5
5
  import { TracingManagerInterface } from "@pristine-ts/telemetry";
6
- import { BreadcrumbHandlerInterface, LogHandlerInterface } from "@pristine-ts/logging";
6
+ import { LogHandlerInterface } from "@pristine-ts/logging";
7
7
  export declare class RequestEventHandler implements EventHandlerInterface<Request, Response> {
8
8
  private readonly router;
9
9
  private readonly logHandler;
10
10
  private readonly tracingManager;
11
11
  private readonly dependencyContainer;
12
- private readonly breadcrumbHandlerInterface;
13
12
  priority: number;
14
- constructor(router: RouterInterface, logHandler: LogHandlerInterface, tracingManager: TracingManagerInterface, dependencyContainer: DependencyContainer, breadcrumbHandlerInterface: BreadcrumbHandlerInterface);
13
+ constructor(router: RouterInterface, logHandler: LogHandlerInterface, tracingManager: TracingManagerInterface, dependencyContainer: DependencyContainer);
15
14
  supports<T>(event: Event<T>): boolean;
16
15
  handle(event: Event<Request>): Promise<EventResponse<Request, Response>>;
17
16
  }
@@ -2,4 +2,3 @@ export * from "./body-mapping.request-interceptor";
2
2
  export * from "./default-content-type-response-header.interceptor";
3
3
  export * from "./request-body-converter.interceptor";
4
4
  export * from "./response-headers.interceptor";
5
- export * from "./error-response-sanitizer.request-interceptor";
@@ -14,5 +14,6 @@ export * from "./nodes/nodes";
14
14
  export * from "./resolvers/resolvers";
15
15
  export * from "./utils/utils";
16
16
  export * from "./router";
17
+ export * from "./responders/http-error.responder";
17
18
  export * from "./networking.configuration-keys";
18
19
  export declare const NetworkingModule: ModuleInterface;
@@ -0,0 +1,43 @@
1
+ import { Response } from "@pristine-ts/common";
2
+ import { EnvironmentManager } from "@pristine-ts/core";
3
+ /**
4
+ * Converts any thrown value into an HTTP `Response`. Single chokepoint that the Router
5
+ * calls from its `catch` blocks — replaces the inline `if (error instanceof HttpError)`
6
+ * block that used to leak stack traces by default.
7
+ *
8
+ * **Production mode (default)**: sanitized output. `SystemError`s render as
9
+ * `{code: "INTERNAL_ERROR", message: "Internal Server Error"}` with no stack, no cause,
10
+ * no internal message. `UserError`s (validation, auth, etc.) surface their code, message,
11
+ * and `details` — those are safe by definition.
12
+ *
13
+ * **Development mode** (`pristine.environment = dev`, env override `PRISTINE_ENV=dev`):
14
+ * everything is included — message, stack, cause chain, structured details. Useful when
15
+ * debugging locally; never appropriate for a deployed instance.
16
+ *
17
+ * Anything that's not already a `PristineError` is normalized via `PristineError.from`,
18
+ * which marks it `kind: PristineErrorKind.SystemError` and propagates the original via
19
+ * the `cause` chain.
20
+ *
21
+ * The environment comes from `EnvironmentManager` — injected, not read from `process.env`
22
+ * directly — so the value flows through the normal configuration graph and can be
23
+ * overridden via `pristine.config.ts` like every other framework setting.
24
+ *
25
+ * **`request` is not set on the returned Response** — the responder doesn't know which
26
+ * inbound request triggered the error. The router assigns `response.request` itself
27
+ * after calling `respond()`.
28
+ */
29
+ export declare class HttpErrorResponder {
30
+ private readonly environmentManager;
31
+ constructor(environmentManager: EnvironmentManager);
32
+ /**
33
+ * Turns any thrown value into a `Response` with status and body populated. The caller
34
+ * assigns `response.request` and layers any error-response interceptors on top.
35
+ */
36
+ respond(error: unknown): Response;
37
+ /**
38
+ * Walks the standard `Error.cause` chain (Node 16.9+ native) and produces a JSON-safe
39
+ * representation. Used in dev mode to surface the full error history without forcing
40
+ * the response object to carry live Error instances.
41
+ */
42
+ private collectCauseChain;
43
+ }
@@ -8,6 +8,7 @@ import { LogHandlerInterface } from "@pristine-ts/logging";
8
8
  import { AuthenticationManagerInterface, AuthorizerManagerInterface } from "@pristine-ts/security";
9
9
  import { RouterCache } from "./cache/router.cache";
10
10
  import { RequestContextManager } from "./managers/request-context.manager";
11
+ import { HttpErrorResponder } from "./responders/http-error.responder";
11
12
  /**
12
13
  * The router service is the service that creates the routing tree from the controllers.
13
14
  * It also executes a request properly by routing it to the intended controller and returns the response.
@@ -19,6 +20,7 @@ export declare class Router implements RouterInterface {
19
20
  private readonly authenticationManager;
20
21
  private readonly cache;
21
22
  private readonly requestContextManager;
23
+ private readonly httpErrorResponder;
22
24
  private root;
23
25
  private setupCompleted;
24
26
  /**
@@ -30,7 +32,7 @@ export declare class Router implements RouterInterface {
30
32
  * @param authorizerManager The authorizer manager to validate authorization.
31
33
  * @param authenticationManager The authentication manager to validate authentication.
32
34
  */
33
- constructor(loghandler: LogHandlerInterface, controllerMethodParameterDecoratorResolver: ControllerMethodParameterDecoratorResolver, authorizerManager: AuthorizerManagerInterface, authenticationManager: AuthenticationManagerInterface, cache: RouterCache, requestContextManager: RequestContextManager);
35
+ constructor(loghandler: LogHandlerInterface, controllerMethodParameterDecoratorResolver: ControllerMethodParameterDecoratorResolver, authorizerManager: AuthorizerManagerInterface, authenticationManager: AuthenticationManagerInterface, cache: RouterCache, requestContextManager: RequestContextManager, httpErrorResponder: HttpErrorResponder);
34
36
  /**
35
37
  * This method returns the whole route tree as a string.
36
38
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pristine-ts/networking",
3
- "version": "2.0.3",
3
+ "version": "2.0.5",
4
4
  "description": "",
5
5
  "module": "dist/lib/esm/networking.module.js",
6
6
  "main": "dist/lib/cjs/networking.module.js",
@@ -20,12 +20,12 @@
20
20
  "access": "public"
21
21
  },
22
22
  "dependencies": {
23
- "@pristine-ts/common": "^2.0.3",
24
- "@pristine-ts/core": "^2.0.3",
25
- "@pristine-ts/data-mapping": "^2.0.3",
23
+ "@pristine-ts/common": "^2.0.5",
24
+ "@pristine-ts/core": "^2.0.5",
25
+ "@pristine-ts/data-mapping": "^2.0.5",
26
26
  "@pristine-ts/metadata": "^1.0.16",
27
- "@pristine-ts/security": "^2.0.3",
28
- "@pristine-ts/telemetry": "^2.0.3",
27
+ "@pristine-ts/security": "^2.0.5",
28
+ "@pristine-ts/telemetry": "^2.0.5",
29
29
  "lodash": "^4.17.21"
30
30
  },
31
31
  "jest": {
@@ -62,7 +62,7 @@
62
62
  "src/*.{js,ts}"
63
63
  ]
64
64
  },
65
- "gitHead": "c741bb430ab8f6286068dc3870fcadf4cefd0023",
65
+ "gitHead": "9a960b330ee1961bb9a6151ce50257c4d8ccd48d",
66
66
  "repository": {
67
67
  "type": "git",
68
68
  "url": "https://github.com/magieno/pristine-ts.git",
@@ -1,20 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BadRequestHttpError = void 0;
4
- const http_error_1 = require("./http.error");
5
- /**
6
- * This Error represents a 400 error.
7
- */
8
- class BadRequestHttpError extends http_error_1.HttpError {
9
- constructor(message, errors) {
10
- super(400, message, errors);
11
- this.message = message;
12
- this.errors = errors;
13
- // Set the prototype explicitly.
14
- // As specified in the documentation in TypeScript
15
- // https://github.com/Microsoft/TypeScript/wiki/Breaking-Changes#extending-built-ins-like-error-array-and-map-may-no-longer-work
16
- Object.setPrototypeOf(this, BadRequestHttpError.prototype);
17
- }
18
- }
19
- exports.BadRequestHttpError = BadRequestHttpError;
20
- //# sourceMappingURL=bad-request.http-error.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"bad-request.http-error.js","sourceRoot":"","sources":["../../../../src/errors/bad-request.http-error.ts"],"names":[],"mappings":";;;AAAA,6CAAuC;AAEvC;;GAEG;AACH,MAAa,mBAAoB,SAAQ,sBAAS;IAChD,YAA4B,OAAe,EAAW,MAAa;QACjE,KAAK,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;QADF,YAAO,GAAP,OAAO,CAAQ;QAAW,WAAM,GAAN,MAAM,CAAO;QAGjE,gCAAgC;QAChC,kDAAkD;QAClD,gIAAgI;QAChI,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,mBAAmB,CAAC,SAAS,CAAC,CAAC;IAC7D,CAAC;CACF;AATD,kDASC"}
@@ -1,19 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ForbiddenHttpError = void 0;
4
- const http_error_1 = require("./http.error");
5
- /**
6
- * This Error represents a 403 error.
7
- */
8
- class ForbiddenHttpError extends http_error_1.HttpError {
9
- constructor(message) {
10
- super(403, message);
11
- this.message = message;
12
- // Set the prototype explicitly.
13
- // As specified in the documentation in TypeScript
14
- // https://github.com/Microsoft/TypeScript/wiki/Breaking-Changes#extending-built-ins-like-error-array-and-map-may-no-longer-work
15
- Object.setPrototypeOf(this, ForbiddenHttpError.prototype);
16
- }
17
- }
18
- exports.ForbiddenHttpError = ForbiddenHttpError;
19
- //# sourceMappingURL=forbidden.http-error.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"forbidden.http-error.js","sourceRoot":"","sources":["../../../../src/errors/forbidden.http-error.ts"],"names":[],"mappings":";;;AAAA,6CAAuC;AAEvC;;GAEG;AACH,MAAa,kBAAmB,SAAQ,sBAAS;IAC/C,YAA4B,OAAe;QACzC,KAAK,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;QADM,YAAO,GAAP,OAAO,CAAQ;QAGzC,gCAAgC;QAChC,kDAAkD;QAClD,gIAAgI;QAChI,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,kBAAkB,CAAC,SAAS,CAAC,CAAC;IAC5D,CAAC;CACF;AATD,gDASC"}
@@ -1,25 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.HttpError = void 0;
4
- const common_1 = require("@pristine-ts/common");
5
- /**
6
- * This class defines a basic HttpError. In your code, feel free to throw an HttpError to have this error returned via HTTP.
7
- * If you throw this error when handling an Event, it won't be returned.
8
- */
9
- class HttpError extends common_1.LoggableError {
10
- constructor(httpStatus, message, errors) {
11
- super(message, {
12
- httpStatus,
13
- errors,
14
- });
15
- this.httpStatus = httpStatus;
16
- this.message = message;
17
- this.errors = errors;
18
- // Set the prototype explicitly.
19
- // As specified in the documentation in TypeScript
20
- // https://github.com/Microsoft/TypeScript/wiki/Breaking-Changes#extending-built-ins-like-error-array-and-map-may-no-longer-work
21
- Object.setPrototypeOf(this, HttpError.prototype);
22
- }
23
- }
24
- exports.HttpError = HttpError;
25
- //# sourceMappingURL=http.error.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"http.error.js","sourceRoot":"","sources":["../../../../src/errors/http.error.ts"],"names":[],"mappings":";;;AAAA,gDAAkD;AAElD;;;GAGG;AACH,MAAa,SAAU,SAAQ,sBAAa;IAC1C,YAAmC,UAAkB,EAAW,OAAe,EAAkB,MAAc;QAC7G,KAAK,CAAC,OAAO,EAAE;YACb,UAAU;YACV,MAAM;SACP,CAAC,CAAC;QAJ8B,eAAU,GAAV,UAAU,CAAQ;QAAW,YAAO,GAAP,OAAO,CAAQ;QAAkB,WAAM,GAAN,MAAM,CAAQ;QAM7G,gCAAgC;QAChC,kDAAkD;QAClD,gIAAgI;QAChI,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACnD,CAAC;CACF;AAZD,8BAYC"}
@@ -1,19 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.InvalidBodyHttpError = void 0;
4
- const http_error_1 = require("./http.error");
5
- /**
6
- * This Error represents a 404 error.
7
- */
8
- class InvalidBodyHttpError extends http_error_1.HttpError {
9
- constructor(message) {
10
- super(400, message);
11
- this.message = message;
12
- // Set the prototype explicitly.
13
- // As specified in the documentation in TypeScript
14
- // https://github.com/Microsoft/TypeScript/wiki/Breaking-Changes#extending-built-ins-like-error-array-and-map-may-no-longer-work
15
- Object.setPrototypeOf(this, InvalidBodyHttpError.prototype);
16
- }
17
- }
18
- exports.InvalidBodyHttpError = InvalidBodyHttpError;
19
- //# sourceMappingURL=invalid-body.http-error.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"invalid-body.http-error.js","sourceRoot":"","sources":["../../../../src/errors/invalid-body.http-error.ts"],"names":[],"mappings":";;;AAAA,6CAAuC;AAEvC;;GAEG;AACH,MAAa,oBAAqB,SAAQ,sBAAS;IACjD,YAA4B,OAAe;QACzC,KAAK,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;QADM,YAAO,GAAP,OAAO,CAAQ;QAGzC,gCAAgC;QAChC,kDAAkD;QAClD,gIAAgI;QAChI,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,oBAAoB,CAAC,SAAS,CAAC,CAAC;IAC9D,CAAC;CACF;AATD,oDASC"}
@@ -1,19 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.NotFoundHttpError = void 0;
4
- const http_error_1 = require("./http.error");
5
- /**
6
- * This Error represents a 404 error.
7
- */
8
- class NotFoundHttpError extends http_error_1.HttpError {
9
- constructor(message) {
10
- super(404, message);
11
- this.message = message;
12
- // Set the prototype explicitly.
13
- // As specified in the documentation in TypeScript
14
- // https://github.com/Microsoft/TypeScript/wiki/Breaking-Changes#extending-built-ins-like-error-array-and-map-may-no-longer-work
15
- Object.setPrototypeOf(this, NotFoundHttpError.prototype);
16
- }
17
- }
18
- exports.NotFoundHttpError = NotFoundHttpError;
19
- //# sourceMappingURL=not-found.http-error.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"not-found.http-error.js","sourceRoot":"","sources":["../../../../src/errors/not-found.http-error.ts"],"names":[],"mappings":";;;AAAA,6CAAuC;AAEvC;;GAEG;AACH,MAAa,iBAAkB,SAAQ,sBAAS;IAC9C,YAA4B,OAAe;QACzC,KAAK,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;QADM,YAAO,GAAP,OAAO,CAAQ;QAGzC,gCAAgC;QAChC,kDAAkD;QAClD,gIAAgI;QAChI,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,iBAAiB,CAAC,SAAS,CAAC,CAAC;IAC3D,CAAC;CACF;AATD,8CASC"}
@@ -1,21 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.RequestInterceptionExecutionError = void 0;
4
- const common_1 = require("@pristine-ts/common");
5
- /**
6
- * This Error is thrown when there's an error in the execution of a request interceptor.
7
- */
8
- class RequestInterceptionExecutionError extends common_1.LoggableError {
9
- constructor(message, request, error) {
10
- super(message, {
11
- error,
12
- request,
13
- });
14
- // Set the prototype explicitly.
15
- // As specified in the documentation in TypeScript
16
- // https://github.com/Microsoft/TypeScript/wiki/Breaking-Changes#extending-built-ins-like-error-array-and-map-may-no-longer-work
17
- Object.setPrototypeOf(this, RequestInterceptionExecutionError.prototype);
18
- }
19
- }
20
- exports.RequestInterceptionExecutionError = RequestInterceptionExecutionError;
21
- //# sourceMappingURL=request-interception-execution.error.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"request-interception-execution.error.js","sourceRoot":"","sources":["../../../../src/errors/request-interception-execution.error.ts"],"names":[],"mappings":";;;AAAA,gDAA2D;AAE3D;;GAEG;AACH,MAAa,iCAAkC,SAAQ,sBAAa;IAElE,YAAmB,OAAe,EAAE,OAAgB,EAAE,KAAa;QACjE,KAAK,CAAC,OAAO,EAAE;YACb,KAAK;YACL,OAAO;SACR,CAAC,CAAC;QAEH,gCAAgC;QAChC,kDAAkD;QAClD,gIAAgI;QAChI,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,iCAAiC,CAAC,SAAS,CAAC,CAAC;IAC3E,CAAC;CACF;AAbD,8EAaC"}
@@ -1,23 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ResponseInterceptionExecutionError = void 0;
4
- const common_1 = require("@pristine-ts/common");
5
- /**
6
- * This Error is thrown when an error happens in the execution of a response interceptor.
7
- */
8
- class ResponseInterceptionExecutionError extends common_1.LoggableError {
9
- constructor(message, request, response, interceptor, previousError) {
10
- super(message, {
11
- previousError,
12
- request,
13
- response,
14
- interceptor,
15
- });
16
- // Set the prototype explicitly.
17
- // As specified in the documentation in TypeScript
18
- // https://github.com/Microsoft/TypeScript/wiki/Breaking-Changes#extending-built-ins-like-error-array-and-map-may-no-longer-work
19
- Object.setPrototypeOf(this, ResponseInterceptionExecutionError.prototype);
20
- }
21
- }
22
- exports.ResponseInterceptionExecutionError = ResponseInterceptionExecutionError;
23
- //# sourceMappingURL=response-interception-execution.error.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"response-interception-execution.error.js","sourceRoot":"","sources":["../../../../src/errors/response-interception-execution.error.ts"],"names":[],"mappings":";;;AAAA,gDAAqE;AAErE;;GAEG;AACH,MAAa,kCAAmC,SAAQ,sBAAa;IAEnE,YAAmB,OAAe,EAAE,OAAgB,EAAE,QAAkB,EAAE,WAAgB,EAAE,aAAqB;QAC/G,KAAK,CAAC,OAAO,EAAE;YACb,aAAa;YACb,OAAO;YACP,QAAQ;YACR,WAAW;SACZ,CAAC,CAAC;QAEH,gCAAgC;QAChC,kDAAkD;QAClD,gIAAgI;QAChI,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,kCAAkC,CAAC,SAAS,CAAC,CAAC;IAC5E,CAAC;CACF;AAfD,gFAeC"}
@@ -1,54 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
- };
11
- var __param = (this && this.__param) || function (paramIndex, decorator) {
12
- return function (target, key) { decorator(target, key, paramIndex); }
13
- };
14
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
15
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
16
- return new (P || (P = Promise))(function (resolve, reject) {
17
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
18
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
19
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
20
- step((generator = generator.apply(thisArg, _arguments || [])).next());
21
- });
22
- };
23
- Object.defineProperty(exports, "__esModule", { value: true });
24
- exports.ErrorResponseSanitizerRequestInterceptor = void 0;
25
- const networking_module_keyname_1 = require("../networking.module.keyname");
26
- const tsyringe_1 = require("tsyringe");
27
- const common_1 = require("@pristine-ts/common");
28
- /**
29
- * This Interceptor removes all stack, traces, etc.. before the response is returned. You can deactivate it using a config.
30
- */
31
- let ErrorResponseSanitizerRequestInterceptor = class ErrorResponseSanitizerRequestInterceptor {
32
- constructor(isActive) {
33
- this.isActive = isActive;
34
- }
35
- interceptError(error, response, request, methodNode) {
36
- return __awaiter(this, void 0, void 0, function* () {
37
- if (!this.isActive || (typeof response.body !== "object" && !Array.isArray(response.body))) {
38
- return response;
39
- }
40
- delete response.body.stack;
41
- delete response.body.extra;
42
- return response;
43
- });
44
- }
45
- };
46
- exports.ErrorResponseSanitizerRequestInterceptor = ErrorResponseSanitizerRequestInterceptor;
47
- exports.ErrorResponseSanitizerRequestInterceptor = ErrorResponseSanitizerRequestInterceptor = __decorate([
48
- (0, common_1.tag)(common_1.ServiceDefinitionTagEnum.RequestInterceptor),
49
- (0, common_1.moduleScoped)(networking_module_keyname_1.NetworkingModuleKeyname),
50
- (0, tsyringe_1.injectable)(),
51
- __param(0, (0, tsyringe_1.inject)(`%${networking_module_keyname_1.NetworkingModuleKeyname}.error_response_sanitizer.is_active%`)),
52
- __metadata("design:paramtypes", [Boolean])
53
- ], ErrorResponseSanitizerRequestInterceptor);
54
- //# sourceMappingURL=error-response-sanitizer.request-interceptor.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"error-response-sanitizer.request-interceptor.js","sourceRoot":"","sources":["../../../../src/interceptors/error-response-sanitizer.request-interceptor.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AACA,4EAAqE;AACrE,uCAA4C;AAC5C,gDAAmG;AAGnG;;GAEG;AAII,IAAM,wCAAwC,GAA9C,MAAM,wCAAwC;IAEnD,YAC8F,QAAiB;QAAjB,aAAQ,GAAR,QAAQ,CAAS;IAE/G,CAAC;IAEK,cAAc,CAAC,KAAY,EAAE,QAAkB,EAAE,OAAgB,EAAE,UAA6B;;YACpG,IAAI,CAAC,IAAI,CAAC,QAAQ,IAAI,CAAC,OAAO,QAAQ,CAAC,IAAI,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC;gBAC3F,OAAO,QAAQ,CAAC;YAClB,CAAC;YAED,OAAO,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC;YAC3B,OAAO,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC;YAE3B,OAAO,QAAQ,CAAC;QAClB,CAAC;KAAA;CACF,CAAA;AAjBY,4FAAwC;mDAAxC,wCAAwC;IAHpD,IAAA,YAAG,EAAC,iCAAwB,CAAC,kBAAkB,CAAC;IAChD,IAAA,qBAAY,EAAC,mDAAuB,CAAC;IACrC,IAAA,qBAAU,GAAE;IAIR,WAAA,IAAA,iBAAM,EAAC,IAAI,mDAAuB,sCAAsC,CAAC,CAAA;;GAHjE,wCAAwC,CAiBpD"}
@@ -1,16 +0,0 @@
1
- import { HttpError } from "./http.error";
2
- /**
3
- * This Error represents a 400 error.
4
- */
5
- export class BadRequestHttpError extends HttpError {
6
- constructor(message, errors) {
7
- super(400, message, errors);
8
- this.message = message;
9
- this.errors = errors;
10
- // Set the prototype explicitly.
11
- // As specified in the documentation in TypeScript
12
- // https://github.com/Microsoft/TypeScript/wiki/Breaking-Changes#extending-built-ins-like-error-array-and-map-may-no-longer-work
13
- Object.setPrototypeOf(this, BadRequestHttpError.prototype);
14
- }
15
- }
16
- //# sourceMappingURL=bad-request.http-error.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"bad-request.http-error.js","sourceRoot":"","sources":["../../../../src/errors/bad-request.http-error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAEvC;;GAEG;AACH,MAAM,OAAO,mBAAoB,SAAQ,SAAS;IAChD,YAA4B,OAAe,EAAW,MAAa;QACjE,KAAK,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;QADF,YAAO,GAAP,OAAO,CAAQ;QAAW,WAAM,GAAN,MAAM,CAAO;QAGjE,gCAAgC;QAChC,kDAAkD;QAClD,gIAAgI;QAChI,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,mBAAmB,CAAC,SAAS,CAAC,CAAC;IAC7D,CAAC;CACF"}
@@ -1,15 +0,0 @@
1
- import { HttpError } from "./http.error";
2
- /**
3
- * This Error represents a 403 error.
4
- */
5
- export class ForbiddenHttpError extends HttpError {
6
- constructor(message) {
7
- super(403, message);
8
- this.message = message;
9
- // Set the prototype explicitly.
10
- // As specified in the documentation in TypeScript
11
- // https://github.com/Microsoft/TypeScript/wiki/Breaking-Changes#extending-built-ins-like-error-array-and-map-may-no-longer-work
12
- Object.setPrototypeOf(this, ForbiddenHttpError.prototype);
13
- }
14
- }
15
- //# sourceMappingURL=forbidden.http-error.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"forbidden.http-error.js","sourceRoot":"","sources":["../../../../src/errors/forbidden.http-error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAEvC;;GAEG;AACH,MAAM,OAAO,kBAAmB,SAAQ,SAAS;IAC/C,YAA4B,OAAe;QACzC,KAAK,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;QADM,YAAO,GAAP,OAAO,CAAQ;QAGzC,gCAAgC;QAChC,kDAAkD;QAClD,gIAAgI;QAChI,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,kBAAkB,CAAC,SAAS,CAAC,CAAC;IAC5D,CAAC;CACF"}
@@ -1,21 +0,0 @@
1
- import { LoggableError } from "@pristine-ts/common";
2
- /**
3
- * This class defines a basic HttpError. In your code, feel free to throw an HttpError to have this error returned via HTTP.
4
- * If you throw this error when handling an Event, it won't be returned.
5
- */
6
- export class HttpError extends LoggableError {
7
- constructor(httpStatus, message, errors) {
8
- super(message, {
9
- httpStatus,
10
- errors,
11
- });
12
- this.httpStatus = httpStatus;
13
- this.message = message;
14
- this.errors = errors;
15
- // Set the prototype explicitly.
16
- // As specified in the documentation in TypeScript
17
- // https://github.com/Microsoft/TypeScript/wiki/Breaking-Changes#extending-built-ins-like-error-array-and-map-may-no-longer-work
18
- Object.setPrototypeOf(this, HttpError.prototype);
19
- }
20
- }
21
- //# sourceMappingURL=http.error.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"http.error.js","sourceRoot":"","sources":["../../../../src/errors/http.error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,aAAa,EAAC,MAAM,qBAAqB,CAAC;AAElD;;;GAGG;AACH,MAAM,OAAO,SAAU,SAAQ,aAAa;IAC1C,YAAmC,UAAkB,EAAW,OAAe,EAAkB,MAAc;QAC7G,KAAK,CAAC,OAAO,EAAE;YACb,UAAU;YACV,MAAM;SACP,CAAC,CAAC;QAJ8B,eAAU,GAAV,UAAU,CAAQ;QAAW,YAAO,GAAP,OAAO,CAAQ;QAAkB,WAAM,GAAN,MAAM,CAAQ;QAM7G,gCAAgC;QAChC,kDAAkD;QAClD,gIAAgI;QAChI,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACnD,CAAC;CACF"}
@@ -1,15 +0,0 @@
1
- import { HttpError } from "./http.error";
2
- /**
3
- * This Error represents a 404 error.
4
- */
5
- export class InvalidBodyHttpError extends HttpError {
6
- constructor(message) {
7
- super(400, message);
8
- this.message = message;
9
- // Set the prototype explicitly.
10
- // As specified in the documentation in TypeScript
11
- // https://github.com/Microsoft/TypeScript/wiki/Breaking-Changes#extending-built-ins-like-error-array-and-map-may-no-longer-work
12
- Object.setPrototypeOf(this, InvalidBodyHttpError.prototype);
13
- }
14
- }
15
- //# sourceMappingURL=invalid-body.http-error.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"invalid-body.http-error.js","sourceRoot":"","sources":["../../../../src/errors/invalid-body.http-error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAEvC;;GAEG;AACH,MAAM,OAAO,oBAAqB,SAAQ,SAAS;IACjD,YAA4B,OAAe;QACzC,KAAK,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;QADM,YAAO,GAAP,OAAO,CAAQ;QAGzC,gCAAgC;QAChC,kDAAkD;QAClD,gIAAgI;QAChI,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,oBAAoB,CAAC,SAAS,CAAC,CAAC;IAC9D,CAAC;CACF"}
@@ -1,15 +0,0 @@
1
- import { HttpError } from "./http.error";
2
- /**
3
- * This Error represents a 404 error.
4
- */
5
- export class NotFoundHttpError extends HttpError {
6
- constructor(message) {
7
- super(404, message);
8
- this.message = message;
9
- // Set the prototype explicitly.
10
- // As specified in the documentation in TypeScript
11
- // https://github.com/Microsoft/TypeScript/wiki/Breaking-Changes#extending-built-ins-like-error-array-and-map-may-no-longer-work
12
- Object.setPrototypeOf(this, NotFoundHttpError.prototype);
13
- }
14
- }
15
- //# sourceMappingURL=not-found.http-error.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"not-found.http-error.js","sourceRoot":"","sources":["../../../../src/errors/not-found.http-error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAEvC;;GAEG;AACH,MAAM,OAAO,iBAAkB,SAAQ,SAAS;IAC9C,YAA4B,OAAe;QACzC,KAAK,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;QADM,YAAO,GAAP,OAAO,CAAQ;QAGzC,gCAAgC;QAChC,kDAAkD;QAClD,gIAAgI;QAChI,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,iBAAiB,CAAC,SAAS,CAAC,CAAC;IAC3D,CAAC;CACF"}
@@ -1,17 +0,0 @@
1
- import { LoggableError } from "@pristine-ts/common";
2
- /**
3
- * This Error is thrown when there's an error in the execution of a request interceptor.
4
- */
5
- export class RequestInterceptionExecutionError extends LoggableError {
6
- constructor(message, request, error) {
7
- super(message, {
8
- error,
9
- request,
10
- });
11
- // Set the prototype explicitly.
12
- // As specified in the documentation in TypeScript
13
- // https://github.com/Microsoft/TypeScript/wiki/Breaking-Changes#extending-built-ins-like-error-array-and-map-may-no-longer-work
14
- Object.setPrototypeOf(this, RequestInterceptionExecutionError.prototype);
15
- }
16
- }
17
- //# sourceMappingURL=request-interception-execution.error.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"request-interception-execution.error.js","sourceRoot":"","sources":["../../../../src/errors/request-interception-execution.error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,aAAa,EAAU,MAAM,qBAAqB,CAAC;AAE3D;;GAEG;AACH,MAAM,OAAO,iCAAkC,SAAQ,aAAa;IAElE,YAAmB,OAAe,EAAE,OAAgB,EAAE,KAAa;QACjE,KAAK,CAAC,OAAO,EAAE;YACb,KAAK;YACL,OAAO;SACR,CAAC,CAAC;QAEH,gCAAgC;QAChC,kDAAkD;QAClD,gIAAgI;QAChI,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,iCAAiC,CAAC,SAAS,CAAC,CAAC;IAC3E,CAAC;CACF"}
@@ -1,19 +0,0 @@
1
- import { LoggableError } from "@pristine-ts/common";
2
- /**
3
- * This Error is thrown when an error happens in the execution of a response interceptor.
4
- */
5
- export class ResponseInterceptionExecutionError extends LoggableError {
6
- constructor(message, request, response, interceptor, previousError) {
7
- super(message, {
8
- previousError,
9
- request,
10
- response,
11
- interceptor,
12
- });
13
- // Set the prototype explicitly.
14
- // As specified in the documentation in TypeScript
15
- // https://github.com/Microsoft/TypeScript/wiki/Breaking-Changes#extending-built-ins-like-error-array-and-map-may-no-longer-work
16
- Object.setPrototypeOf(this, ResponseInterceptionExecutionError.prototype);
17
- }
18
- }
19
- //# sourceMappingURL=response-interception-execution.error.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"response-interception-execution.error.js","sourceRoot":"","sources":["../../../../src/errors/response-interception-execution.error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,aAAa,EAAoB,MAAM,qBAAqB,CAAC;AAErE;;GAEG;AACH,MAAM,OAAO,kCAAmC,SAAQ,aAAa;IAEnE,YAAmB,OAAe,EAAE,OAAgB,EAAE,QAAkB,EAAE,WAAgB,EAAE,aAAqB;QAC/G,KAAK,CAAC,OAAO,EAAE;YACb,aAAa;YACb,OAAO;YACP,QAAQ;YACR,WAAW;SACZ,CAAC,CAAC;QAEH,gCAAgC;QAChC,kDAAkD;QAClD,gIAAgI;QAChI,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,kCAAkC,CAAC,SAAS,CAAC,CAAC;IAC5E,CAAC;CACF"}