@kravc/dos 2.0.0-alpha.3 → 2.0.0-alpha.4

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 (25) hide show
  1. package/dist/Operation/Operation.js +2 -2
  2. package/dist/Operation/errors/{UnprocessibleConditionError.d.ts → UnprocessableConditionError.d.ts} +6 -6
  3. package/dist/Operation/errors/{UnprocessibleConditionError.d.ts.map → UnprocessableConditionError.d.ts.map} +1 -1
  4. package/dist/Operation/errors/{UnprocessibleConditionError.js → UnprocessableConditionError.js} +8 -8
  5. package/dist/Operation/errors/{UnprocessibleConditionError.js.map → UnprocessableConditionError.js.map} +1 -1
  6. package/dist/Operation/errors/index.d.ts +2 -2
  7. package/dist/Operation/errors/index.js +3 -3
  8. package/dist/Service/errors/OperationError.d.ts +2 -2
  9. package/dist/Service/errors/OperationError.d.ts.map +1 -1
  10. package/dist/Service/errors/OperationError.js.map +1 -1
  11. package/package.json +1 -1
  12. package/src/Operation/Operation.ts +2 -2
  13. package/src/Operation/errors/{UnprocessibleConditionError.ts → UnprocessableConditionError.ts} +7 -7
  14. package/src/Operation/errors/__tests__/UnprocessableConditionError.test.ts +20 -0
  15. package/src/Operation/errors/index.ts +2 -2
  16. package/src/Operation/operations/__tests__/Create.test.ts +1 -1
  17. package/src/Operation/operations/__tests__/Delete.test.ts +1 -1
  18. package/src/Operation/operations/__tests__/Index.test.ts +1 -1
  19. package/src/Operation/operations/__tests__/List.test.ts +1 -1
  20. package/src/Operation/operations/__tests__/Read.test.ts +1 -1
  21. package/src/Operation/operations/__tests__/Update.test.ts +1 -1
  22. package/src/Service/__tests__/Service.test.ts +1 -6
  23. package/src/Service/errors/OperationError.ts +2 -2
  24. package/src/Service/errors/OperationErrorAttributes.d.ts +1 -1
  25. package/src/Operation/errors/__tests__/UnprocessibleConditionError.test.ts +0 -20
@@ -136,10 +136,10 @@ class Operation {
136
136
  errors.InvalidParametersError = {
137
137
  statusCode: 400,
138
138
  description: 'Invalid operation parameters, input syntax is correct,' +
139
- ' but input values are not processible'
139
+ ' but input values are not processable'
140
140
  };
141
141
  }
142
- errors.UnprocessibleConditionError = {
142
+ errors.UnprocessableConditionError = {
143
143
  statusCode: 422,
144
144
  description: 'Operation failed to process the request cause of expected' +
145
145
  ' exit condition'
@@ -1,8 +1,8 @@
1
1
  import CommonError from './CommonError';
2
2
  /**
3
- * Unprocessible Condition Error
3
+ * Unprocessable Condition Error
4
4
  *
5
- * `UnprocessibleConditionError` represents a **422 Unprocessable Entity** error that occurs
5
+ * `UnprocessableConditionError` represents a **422 Unprocessable Entity** error that occurs
6
6
  * when an operation encounters an expected exit condition that prevents it from processing
7
7
  * the request. This error indicates that the request is well-formed and valid, but the
8
8
  * operation cannot proceed due to business logic constraints or state conditions.
@@ -21,9 +21,9 @@ import CommonError from './CommonError';
21
21
  * The 422 status code indicates that the server understands the request but cannot process
22
22
  * it due to semantic errors or business logic constraints.
23
23
  */
24
- declare class UnprocessibleConditionError extends CommonError {
25
- /** Creates an instance of unprocessible condition error. */
24
+ declare class UnprocessableConditionError extends CommonError {
25
+ /** Creates an instance of unprocessable condition error. */
26
26
  constructor(message?: string);
27
27
  }
28
- export default UnprocessibleConditionError;
29
- //# sourceMappingURL=UnprocessibleConditionError.d.ts.map
28
+ export default UnprocessableConditionError;
29
+ //# sourceMappingURL=UnprocessableConditionError.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"UnprocessibleConditionError.d.ts","sourceRoot":"","sources":["../../../src/Operation/errors/UnprocessibleConditionError.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,eAAe,CAAC;AAExC;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,cAAM,2BAA4B,SAAQ,WAAW;IACnD,4DAA4D;gBAChD,OAAO,GAAE,MAAkC;CAGxD;AAED,eAAe,2BAA2B,CAAC"}
1
+ {"version":3,"file":"UnprocessableConditionError.d.ts","sourceRoot":"","sources":["../../../src/Operation/errors/UnprocessableConditionError.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,eAAe,CAAC;AAExC;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,cAAM,2BAA4B,SAAQ,WAAW;IACnD,4DAA4D;gBAChD,OAAO,GAAE,MAAkC;CAGxD;AAED,eAAe,2BAA2B,CAAC"}
@@ -5,9 +5,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const CommonError_1 = __importDefault(require("./CommonError"));
7
7
  /**
8
- * Unprocessible Condition Error
8
+ * Unprocessable Condition Error
9
9
  *
10
- * `UnprocessibleConditionError` represents a **422 Unprocessable Entity** error that occurs
10
+ * `UnprocessableConditionError` represents a **422 Unprocessable Entity** error that occurs
11
11
  * when an operation encounters an expected exit condition that prevents it from processing
12
12
  * the request. This error indicates that the request is well-formed and valid, but the
13
13
  * operation cannot proceed due to business logic constraints or state conditions.
@@ -26,11 +26,11 @@ const CommonError_1 = __importDefault(require("./CommonError"));
26
26
  * The 422 status code indicates that the server understands the request but cannot process
27
27
  * it due to semantic errors or business logic constraints.
28
28
  */
29
- class UnprocessibleConditionError extends CommonError_1.default {
30
- /** Creates an instance of unprocessible condition error. */
31
- constructor(message = 'Unprocessible condition') {
32
- super('UnprocessibleConditionError', message);
29
+ class UnprocessableConditionError extends CommonError_1.default {
30
+ /** Creates an instance of unprocessable condition error. */
31
+ constructor(message = 'Unprocessable condition') {
32
+ super('UnprocessableConditionError', message);
33
33
  }
34
34
  }
35
- exports.default = UnprocessibleConditionError;
36
- //# sourceMappingURL=UnprocessibleConditionError.js.map
35
+ exports.default = UnprocessableConditionError;
36
+ //# sourceMappingURL=UnprocessableConditionError.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"UnprocessibleConditionError.js","sourceRoot":"","sources":["../../../src/Operation/errors/UnprocessibleConditionError.ts"],"names":[],"mappings":";;;;;AAAA,gEAAwC;AAExC;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,2BAA4B,SAAQ,qBAAW;IACnD,4DAA4D;IAC5D,YAAY,UAAkB,yBAAyB;QACrD,KAAK,CAAC,6BAA6B,EAAE,OAAO,CAAC,CAAC;IAChD,CAAC;CACF;AAED,kBAAe,2BAA2B,CAAC"}
1
+ {"version":3,"file":"UnprocessableConditionError.js","sourceRoot":"","sources":["../../../src/Operation/errors/UnprocessableConditionError.ts"],"names":[],"mappings":";;;;;AAAA,gEAAwC;AAExC;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,2BAA4B,SAAQ,qBAAW;IACnD,4DAA4D;IAC5D,YAAY,UAAkB,yBAAyB;QACrD,KAAK,CAAC,6BAA6B,EAAE,OAAO,CAAC,CAAC;IAChD,CAAC;CACF;AAED,kBAAe,2BAA2B,CAAC"}
@@ -4,6 +4,6 @@ import AccessDeniedError from './AccessDeniedError';
4
4
  import DocumentExistsError from './DocumentExistsError';
5
5
  import DocumentNotFoundError from './DocumentNotFoundError';
6
6
  import InvalidParametersError from './InvalidParametersError';
7
- import UnprocessibleConditionError from './UnprocessibleConditionError';
8
- export { CommonError, UnauthorizedError, AccessDeniedError, DocumentExistsError, DocumentNotFoundError, InvalidParametersError, UnprocessibleConditionError, };
7
+ import UnprocessableConditionError from './UnprocessableConditionError';
8
+ export { CommonError, UnauthorizedError, AccessDeniedError, DocumentExistsError, DocumentNotFoundError, InvalidParametersError, UnprocessableConditionError, };
9
9
  //# sourceMappingURL=index.d.ts.map
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.UnprocessibleConditionError = exports.InvalidParametersError = exports.DocumentNotFoundError = exports.DocumentExistsError = exports.AccessDeniedError = exports.UnauthorizedError = exports.CommonError = void 0;
6
+ exports.UnprocessableConditionError = exports.InvalidParametersError = exports.DocumentNotFoundError = exports.DocumentExistsError = exports.AccessDeniedError = exports.UnauthorizedError = exports.CommonError = void 0;
7
7
  const CommonError_1 = __importDefault(require("./CommonError"));
8
8
  exports.CommonError = CommonError_1.default;
9
9
  const UnauthorizedError_1 = __importDefault(require("./UnauthorizedError"));
@@ -16,6 +16,6 @@ const DocumentNotFoundError_1 = __importDefault(require("./DocumentNotFoundError
16
16
  exports.DocumentNotFoundError = DocumentNotFoundError_1.default;
17
17
  const InvalidParametersError_1 = __importDefault(require("./InvalidParametersError"));
18
18
  exports.InvalidParametersError = InvalidParametersError_1.default;
19
- const UnprocessibleConditionError_1 = __importDefault(require("./UnprocessibleConditionError"));
20
- exports.UnprocessibleConditionError = UnprocessibleConditionError_1.default;
19
+ const UnprocessableConditionError_1 = __importDefault(require("./UnprocessableConditionError"));
20
+ exports.UnprocessableConditionError = UnprocessableConditionError_1.default;
21
21
  //# sourceMappingURL=index.js.map
@@ -1,6 +1,6 @@
1
1
  import Component from '../../Component';
2
2
  import { Context } from '../../Context';
3
- import { OperationErrorAttibutes } from './OperationErrorAttributes';
3
+ import { OperationErrorAttributes } from './OperationErrorAttributes';
4
4
  import { type OriginalError } from './logOperationError';
5
5
  /**
6
6
  * Operation Error
@@ -20,7 +20,7 @@ import { type OriginalError } from './logOperationError';
20
20
  * This class acts as the final error handler in the operation processing pipeline,
21
21
  * transforming any thrown error into a standardized, schema-validated response format.
22
22
  */
23
- declare class OperationError extends Component<OperationErrorAttibutes> {
23
+ declare class OperationError extends Component<OperationErrorAttributes> {
24
24
  /** Returns schema of the operation error. */
25
25
  static get schema(): import("@kravc/schema").Schema;
26
26
  /** Creates instance of an operation error. */
@@ -1 +1 @@
1
- {"version":3,"file":"OperationError.d.ts","sourceRoot":"","sources":["../../../src/Service/errors/OperationError.ts"],"names":[],"mappings":"AACA,OAAO,SAAS,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AACrE,OAA0B,EAAE,KAAK,aAAa,EAAwB,MAAM,qBAAqB,CAAC;AAOlG;;;;;;;;;;;;;;;;;GAiBG;AACH,cAAM,cAAe,SAAQ,SAAS,CAAC,uBAAuB,CAAC;IAC7D,6CAA6C;IAC7C,MAAM,KAAK,MAAM,mCAEhB;IAED,8CAA8C;gBAClC,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,aAAa,EAAE,aAAa;CAkC/E;AAED,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"OperationError.d.ts","sourceRoot":"","sources":["../../../src/Service/errors/OperationError.ts"],"names":[],"mappings":"AACA,OAAO,SAAS,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAA0B,EAAE,KAAK,aAAa,EAAwB,MAAM,qBAAqB,CAAC;AAOlG;;;;;;;;;;;;;;;;;GAiBG;AACH,cAAM,cAAe,SAAQ,SAAS,CAAC,wBAAwB,CAAC;IAC9D,6CAA6C;IAC7C,MAAM,KAAK,MAAM,mCAEhB;IAED,8CAA8C;gBAClC,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,aAAa,EAAE,aAAa;CAkC/E;AAED,eAAe,cAAc,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"OperationError.js","sourceRoot":"","sources":["../../../src/Service/errors/OperationError.ts"],"names":[],"mappings":";;;;;AAAA,gDAAwB;AACxB,gEAAwC;AAExC,0CAAyC;AAEzC,4EAAkG;AAElG,MAAM,WAAW,GAAG,cAAI,CAAC,OAAO,CAAC,SAAS,CAAC,GAAG,sBAAsB,CAAC;AACrE,MAAM,oBAAoB,GAAG,IAAA,iBAAQ,EAAC,WAAW,CAAC,CAAC;AAEnD,MAAM,mBAAmB,GAAG,GAAG,CAAC;AAEhC;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,cAAe,SAAQ,mBAAkC;IAC7D,6CAA6C;IAC7C,MAAM,KAAK,MAAM;QACf,OAAO,oBAAoB,CAAC;IAC9B,CAAC;IAED,8CAA8C;IAC9C,YAAY,OAAgB,EAAE,UAAkB,EAAE,aAA4B;QAC5E,MAAM,EACJ,IAAI,EACJ,OAAO,EACP,aAAa,EACb,gBAAgB,GACjB,GAAG,aAAa,CAAC;QAElB,MAAM,KAAK,GAAG;YACZ,IAAI;YACJ,OAAO;YACP,UAAU;SACQ,CAAC;QAErB,IAAI,gBAAgB,EAAE,CAAC;YACrB,KAAK,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;QAC5C,CAAC;QAED,MAAM,iBAAiB,GAAG,CAAC,aAAa,CAAC;QAEzC,IAAI,iBAAiB,EAAE,CAAC;YACtB,KAAK,CAAC,IAAI,GAAG,gBAAgB,CAAC;YAC9B,KAAK,CAAC,OAAO,GAAG,4BAA4B,CAAC;QAC/C,CAAC;QAED,MAAM,UAAU,GAAG,EAAE,KAAK,EAAE,CAAC;QAC7B,KAAK,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;QAE3B,MAAM,cAAc,GAAG,UAAU,KAAK,mBAAmB,CAAC;QAE1D,IAAI,cAAc,EAAE,CAAC;YACnB,IAAA,2BAAiB,EAAC,OAAO,EAAE,KAAK,EAAE,aAAa,CAAC,CAAC;QACnD,CAAC;IACH,CAAC;CACF;AAED,kBAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"OperationError.js","sourceRoot":"","sources":["../../../src/Service/errors/OperationError.ts"],"names":[],"mappings":";;;;;AAAA,gDAAwB;AACxB,gEAAwC;AAExC,0CAAyC;AAEzC,4EAAkG;AAElG,MAAM,WAAW,GAAG,cAAI,CAAC,OAAO,CAAC,SAAS,CAAC,GAAG,sBAAsB,CAAC;AACrE,MAAM,oBAAoB,GAAG,IAAA,iBAAQ,EAAC,WAAW,CAAC,CAAC;AAEnD,MAAM,mBAAmB,GAAG,GAAG,CAAC;AAEhC;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,cAAe,SAAQ,mBAAmC;IAC9D,6CAA6C;IAC7C,MAAM,KAAK,MAAM;QACf,OAAO,oBAAoB,CAAC;IAC9B,CAAC;IAED,8CAA8C;IAC9C,YAAY,OAAgB,EAAE,UAAkB,EAAE,aAA4B;QAC5E,MAAM,EACJ,IAAI,EACJ,OAAO,EACP,aAAa,EACb,gBAAgB,GACjB,GAAG,aAAa,CAAC;QAElB,MAAM,KAAK,GAAG;YACZ,IAAI;YACJ,OAAO;YACP,UAAU;SACQ,CAAC;QAErB,IAAI,gBAAgB,EAAE,CAAC;YACrB,KAAK,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;QAC5C,CAAC;QAED,MAAM,iBAAiB,GAAG,CAAC,aAAa,CAAC;QAEzC,IAAI,iBAAiB,EAAE,CAAC;YACtB,KAAK,CAAC,IAAI,GAAG,gBAAgB,CAAC;YAC9B,KAAK,CAAC,OAAO,GAAG,4BAA4B,CAAC;QAC/C,CAAC;QAED,MAAM,UAAU,GAAG,EAAE,KAAK,EAAE,CAAC;QAC7B,KAAK,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;QAE3B,MAAM,cAAc,GAAG,UAAU,KAAK,mBAAmB,CAAC;QAE1D,IAAI,cAAc,EAAE,CAAC;YACnB,IAAA,2BAAiB,EAAC,OAAO,EAAE,KAAK,EAAE,aAAa,CAAC,CAAC;QACnD,CAAC;IACH,CAAC;CACF;AAED,kBAAe,cAAc,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kravc/dos",
3
- "version": "2.0.0-alpha.3",
3
+ "version": "2.0.0-alpha.4",
4
4
  "description": "Convention-based, easy-to-use library for building API-driven serverless services.",
5
5
  "keywords": [
6
6
  "Service",
@@ -184,11 +184,11 @@ class Operation {
184
184
  errors.InvalidParametersError = {
185
185
  statusCode: 400,
186
186
  description: 'Invalid operation parameters, input syntax is correct,' +
187
- ' but input values are not processible'
187
+ ' but input values are not processable'
188
188
  };
189
189
  }
190
190
 
191
- errors.UnprocessibleConditionError = {
191
+ errors.UnprocessableConditionError = {
192
192
  statusCode: 422,
193
193
  description: 'Operation failed to process the request cause of expected' +
194
194
  ' exit condition'
@@ -1,9 +1,9 @@
1
1
  import CommonError from './CommonError';
2
2
 
3
3
  /**
4
- * Unprocessible Condition Error
4
+ * Unprocessable Condition Error
5
5
  *
6
- * `UnprocessibleConditionError` represents a **422 Unprocessable Entity** error that occurs
6
+ * `UnprocessableConditionError` represents a **422 Unprocessable Entity** error that occurs
7
7
  * when an operation encounters an expected exit condition that prevents it from processing
8
8
  * the request. This error indicates that the request is well-formed and valid, but the
9
9
  * operation cannot proceed due to business logic constraints or state conditions.
@@ -22,11 +22,11 @@ import CommonError from './CommonError';
22
22
  * The 422 status code indicates that the server understands the request but cannot process
23
23
  * it due to semantic errors or business logic constraints.
24
24
  */
25
- class UnprocessibleConditionError extends CommonError {
26
- /** Creates an instance of unprocessible condition error. */
27
- constructor(message: string = 'Unprocessible condition') {
28
- super('UnprocessibleConditionError', message);
25
+ class UnprocessableConditionError extends CommonError {
26
+ /** Creates an instance of unprocessable condition error. */
27
+ constructor(message: string = 'Unprocessable condition') {
28
+ super('UnprocessableConditionError', message);
29
29
  }
30
30
  }
31
31
 
32
- export default UnprocessibleConditionError;
32
+ export default UnprocessableConditionError;
@@ -0,0 +1,20 @@
1
+ import UnprocessableConditionError from '../UnprocessableConditionError';
2
+
3
+ describe('UnprocessableConditionError', () => {
4
+ describe('UnprocessableConditionError.constructor(message)', () => {
5
+ it('creates an instance with default message when no message is provided', () => {
6
+ const err = new UnprocessableConditionError();
7
+
8
+ expect(err.code).toBe('UnprocessableConditionError');
9
+ expect(err.message).toBe('Unprocessable condition');
10
+ });
11
+
12
+ it('creates an instance with custom message when provided', () => {
13
+ const customMessage = 'Order is already canceled';
14
+ const err = new UnprocessableConditionError(customMessage);
15
+
16
+ expect(err.code).toBe('UnprocessableConditionError');
17
+ expect(err.message).toBe(customMessage);
18
+ });
19
+ });
20
+ });
@@ -4,7 +4,7 @@ import AccessDeniedError from './AccessDeniedError';
4
4
  import DocumentExistsError from './DocumentExistsError';
5
5
  import DocumentNotFoundError from './DocumentNotFoundError';
6
6
  import InvalidParametersError from './InvalidParametersError';
7
- import UnprocessibleConditionError from './UnprocessibleConditionError';
7
+ import UnprocessableConditionError from './UnprocessableConditionError';
8
8
 
9
9
  export {
10
10
  CommonError,
@@ -13,5 +13,5 @@ export {
13
13
  DocumentExistsError,
14
14
  DocumentNotFoundError,
15
15
  InvalidParametersError,
16
- UnprocessibleConditionError,
16
+ UnprocessableConditionError,
17
17
  };
@@ -100,7 +100,7 @@ describe('Create(Document, actionMethod)', () => {
100
100
  const errorCodes = Object.keys(CreateProfile.errors);
101
101
  expect(errorCodes).toContain('InvalidInputError');
102
102
  expect(errorCodes).toContain('InvalidOutputError');
103
- expect(errorCodes).toContain('UnprocessibleConditionError');
103
+ expect(errorCodes).toContain('UnprocessableConditionError');
104
104
  expect(errorCodes).toContain('DocumentExistsError');
105
105
  });
106
106
  });
@@ -99,7 +99,7 @@ describe('Delete(Document, actionMethod)', () => {
99
99
  it('includes related errors', () => {
100
100
  const errorCodes = Object.keys(DeleteProfile.errors);
101
101
  expect(errorCodes).toContain('InvalidInputError');
102
- expect(errorCodes).toContain('UnprocessibleConditionError');
102
+ expect(errorCodes).toContain('UnprocessableConditionError');
103
103
  expect(errorCodes).toContain('DocumentNotFoundError');
104
104
  });
105
105
  });
@@ -95,7 +95,7 @@ describe('Index(Document, actionMethod)', () => {
95
95
  const errorCodes = Object.keys(IndexProfiles.errors);
96
96
  expect(errorCodes).toContain('InvalidInputError');
97
97
  expect(errorCodes).toContain('InvalidOutputError');
98
- expect(errorCodes).toContain('UnprocessibleConditionError');
98
+ expect(errorCodes).toContain('UnprocessableConditionError');
99
99
  });
100
100
  });
101
101
 
@@ -93,7 +93,7 @@ describe('List(Document, actionMethod)', () => {
93
93
  it('includes related errors', () => {
94
94
  const errorCodes = Object.keys(ListProfiles.errors);
95
95
  expect(errorCodes).toContain('InvalidOutputError');
96
- expect(errorCodes).toContain('UnprocessibleConditionError');
96
+ expect(errorCodes).toContain('UnprocessableConditionError');
97
97
  });
98
98
  });
99
99
 
@@ -94,7 +94,7 @@ describe('Read(Document, actionMethod)', () => {
94
94
  const errorCodes = Object.keys(ReadProfile.errors);
95
95
  expect(errorCodes).toContain('InvalidInputError');
96
96
  expect(errorCodes).toContain('InvalidOutputError');
97
- expect(errorCodes).toContain('UnprocessibleConditionError');
97
+ expect(errorCodes).toContain('UnprocessableConditionError');
98
98
  expect(errorCodes).toContain('DocumentNotFoundError');
99
99
  });
100
100
  });
@@ -100,7 +100,7 @@ describe('Update(Document, actionMethod)', () => {
100
100
  const errorCodes = Object.keys(UpdateProfile.errors);
101
101
  expect(errorCodes).toContain('InvalidInputError');
102
102
  expect(errorCodes).toContain('InvalidOutputError');
103
- expect(errorCodes).toContain('UnprocessibleConditionError');
103
+ expect(errorCodes).toContain('UnprocessableConditionError');
104
104
  expect(errorCodes).toContain('DocumentNotFoundError');
105
105
  });
106
106
  });
@@ -178,12 +178,7 @@ describe('Service', () => {
178
178
 
179
179
  const body = JSON.parse(json!);
180
180
 
181
- expect(body).toEqual({
182
- info: {
183
- title: '@kravc/dos',
184
- version: '2.0.0-alpha.3',
185
- },
186
- });
181
+ expect(body.info.title).toEqual('@kravc/dos');
187
182
  });
188
183
 
189
184
  it('returns composer file for /Enums.yaml path', async () => {
@@ -2,7 +2,7 @@ import path from 'path';
2
2
  import Component from '../../Component';
3
3
  import { Context } from '../../Context';
4
4
  import { loadSync } from '@kravc/schema';
5
- import { OperationErrorAttibutes } from './OperationErrorAttributes';
5
+ import { OperationErrorAttributes } from './OperationErrorAttributes';
6
6
  import logOperationError, { type OriginalError, type ErrorAttributes } from './logOperationError';
7
7
 
8
8
  const SCHEMA_PATH = path.resolve(__dirname) + '/OperationError.yaml';
@@ -28,7 +28,7 @@ const INTERNAL_ERROR_CODE = 500;
28
28
  * This class acts as the final error handler in the operation processing pipeline,
29
29
  * transforming any thrown error into a standardized, schema-validated response format.
30
30
  */
31
- class OperationError extends Component<OperationErrorAttibutes> {
31
+ class OperationError extends Component<OperationErrorAttributes> {
32
32
  /** Returns schema of the operation error. */
33
33
  static get schema() {
34
34
  return operationErrorSchema;
@@ -1,4 +1,4 @@
1
- export type OperationErrorAttibutes = {
1
+ export type OperationErrorAttributes = {
2
2
  error: {
3
3
  code: string;
4
4
  message: string;
@@ -1,20 +0,0 @@
1
- import UnprocessibleConditionError from '../UnprocessibleConditionError';
2
-
3
- describe('UnprocessibleConditionError', () => {
4
- describe('UnprocessibleConditionError.constructor(message)', () => {
5
- it('creates an instance with default message when no message is provided', () => {
6
- const err = new UnprocessibleConditionError();
7
-
8
- expect(err.code).toBe('UnprocessibleConditionError');
9
- expect(err.message).toBe('Unprocessible condition');
10
- });
11
-
12
- it('creates an instance with custom message when provided', () => {
13
- const customMessage = 'Order is already cancelled';
14
- const err = new UnprocessibleConditionError(customMessage);
15
-
16
- expect(err.code).toBe('UnprocessibleConditionError');
17
- expect(err.message).toBe(customMessage);
18
- });
19
- });
20
- });