Need private packages and team management tools?Check out npm Teams »

@u-e-i/err-reached-max-retry

1.0.6 • Public • Published

ERR_REACHED_MAX_RETRY

Kind: global class
Properties

Name Type Description
code string ERR_REACHED_MAX_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 : Reached max retry of ${this.actor}.${this.activity}()

new ERR_REACHED_MAX_RETRY()

Throw when reached max retry times

Example

  {
    "message" : "Reached max retry of OrderService.createOrder()",
    "code": "ERR_REACHED_MAX_RETRY",
    "actor": "OrderService",
    "activity": "createOrder",
    "logs": [
      {
        "time": 200,
        "error": {
          "message": "Service Unavailable",
          "status": 503
        }
      },
      {
        "time": 400,
        "error": {
          "message": "Bad Gateway",
          "status": 500
        }
      }
    ],
    "reactions": [
      "TERMINATE"
    ]
  }

Install

npm i @u-e-i/err-reached-max-retry

DownloadsWeekly Downloads

11

Version

1.0.6

License

MIT

Unpacked Size

4.2 kB

Total Files

5

Last publish

Collaborators

  • avatar
  • avatar