@u-e-i/err-cannot-retry

1.0.2 • Public • Published

ERR_CANNOT_RETRY

Kind: global class
Properties

Name Type Description
code string ERR_CANNOT_RETRY
activity string activity's name
actor string who do this activity
logs Array.<object> list error and time of each retry operation
logs[].time number time of retry operation
logs[].error error error of retry operation
reactions Array.<string> [TERMINATE]
message string template : Can't retry ${this.actor}.${this.activity}()

new ERR_CANNOT_RETRY()

Throw when can't continue to retry the operation will fail

Example

  {
    "message" : "Can't retry OrderService.createOrder()",
    "code": "ERR_CANNOT_RETRY",
    "actor": "OrderService",
    "activity": "createOrder",
    "logs": [
      {
        "time": 200,
        "error": {
          "message": "Service Unavailable",
          "status": 503
        }
      },
      {
        "time": 400,
        "error": {
          "message": "Items must be an array",
          "status": 400
        }
      }
    ],
    "reactions": [
      "TERMINATE"
    ]
  }

Readme

Keywords

Package Sidebar

Install

npm i @u-e-i/err-cannot-retry

Weekly Downloads

88

Version

1.0.2

License

MIT

Unpacked Size

4.12 kB

Total Files

5

Last publish

Collaborators

  • _hoang_
  • universal.x.interfaces