1.0.2 • Published 5 years ago

@u-e-i/err-cannot-retry v1.0.2

Weekly downloads
94
License
MIT
Repository
-
Last release
5 years ago

ERR_CANNOT_RETRY

Kind: global class
Properties

NameTypeDescription
codestringERR_CANNOT_RETRY
activitystringactivity's name
actorstringwho do this activity
logsArray.<object>list error and time of each retry operation
logs[].timenumbertime of retry operation
logs[].errorerrorerror of retry operation
reactionsArray.<string>TERMINATE
messagestringtemplate : 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"
    ]
  }