Skip to main content

Action Error References

Examples of Error Structure

{
"error_code": "InvalidStatusCodeBlinkHttpErr",
"message": "Blink received an invalid status code after sending an HTTP request to the vendor",
"data": {
"request": {
"host": "httpbin.org",
"method": "GET",
"path": "/status/500"
},
"response": {
"body": "",
"headers": {
"Access-Control-Allow-Credentials": ["true"],
"Access-Control-Allow-Origin": ["*"],
"Content-Length": ["0"],
"Content-Type": ["text/html; charset=utf-8"],
"Date": ["Wed, 02 Aug 2023 08:04:20 GMT"],
"Server": ["gunicorn/19.9.0"]
},
"status_code": 500
}
}
}

Error Structure Explained

  1. error_code: Is the name of the Error Code.
  2. message: Provides a descriptive explanation of the error that occurred.
  3. data: Contains any additional information related to the error being returned such as the request method, host and path.
  4. response: Contains the Headers and the body of the request sent.
note

Please be aware that each error is unique. Consequently, some errors may encompass additional data fields, while others might have fewer data fields. This variation depends on the executed action and the specific error encountered. The above Error Structure serves as just one example among several different types of error structures. However, they consistently encompass the essential components of error_code, message, data and body.

Error Types

Error TypeError CodeError Message
HTTP ERRORBLINK_HTTP_ERR_INVALID_STATUS_CODEBlink received an invalid status code after sending an HTTP request to the vendor
HTTP ERRORBLINK_HTTP_ERR_PAYLOAD_ERRORBlink received an error in the response body after sending an HTTP request to the vendor
HTTP ERRORBLINK_HTTP_ERR_RATE_LIMITBlink encountered a rate-limit after sending an HTTP request to the vendor
HTTP ERRORBLINK_HTTP_ERR_RATE_LIMIT_TIMEOUTThe wait duration for API rate limit reset is longer than the request timeout
REQUEST ERRORBLINK_HTTP_ERR_MISSING_REQUIRED_PARAMMissing mandatory parameter %s
REQUEST ERRORBLINK_HTTP_ERR_PAYLOAD_LIMITBlink failed to parse the base URL (%s) for this action
REQUEST ERRORBLINK_HTTP_ERR_BASE_URLBlink failed to join the base URL with the user's relative path for this action

Generic Rate-Limit

Rate limiting controls how often requests can be made to a system or service. It sets a maximum number of requests allowed within a certain period (seconds, minutes, or hours). When this limit is reached, the system may delay or reject further requests until the next time period starts. Blink handles rate limit errors automatically. This is how we do it:

In the Blink Ops Editor, when sending an HTTP request as part of an action, if the Blink's system receives the response code 429, it indicates that the generic rate limit has been reached. Additionally, the presence of headers X-RateLimit-Remaining or X-Rate-Limit-Remaining with a value of 0 confirms this limit has been reached.

The system will then check for the X-RateLimit-Reset and X-Rate-Limit-Reset headers. If these headers are present, they provide an epoch time indicating when you can resume sending requests. The system will automatically retry at that specified time.

Additionally, if the Retry-After header is found, it indicates the number of seconds to wait before retrying. The system will automatically retry after the specified duration.

In the absence of these headers, the system will employ an exponential backoff strategy, starting with a delay of 100ms. The retries will continue until the step reaches its configured timeout. If the required wait duration for the API rate limit reset exceeds the step timeout, the following message will be returned: “The wait duration for API rate limit reset is longer than the request timeout”.

In Blink's HTTP actions, the advanced settings include an option to Retry on Rate Limit. This feature can be enabled by checking the corresponding box. To disable it, simply uncheck the box.

info

In all other HTTP-based actions available on the Blink Platform, the Retry on Rate Limit feature is always automatically enabled.

Thumbnail
tip

To prevent these errors, we recommend reducing the number of requests sent through the chosen HTTP action.