Skip to main content

InfluxDBErrorUtils

Types

InfluxDBError

interface InfluxDBError {
codestring
messagestring
}

InfluxDB error type.

Functions

tryParseErrorBody

InfluxDBErrorUtils.tryParseErrorBody(bodystring) → InfluxDBError?

Tries to parse the error body from InfluxDB. Returns nil if it fails to parse.

isInfluxDBError

InfluxDBErrorUtils.isInfluxDBError(dataany) → boolean

Checks if the given data is an InfluxDB error.

Show raw api
{
    "functions": [
        {
            "name": "tryParseErrorBody",
            "desc": "Tries to parse the error body from InfluxDB.\nReturns nil if it fails to parse.",
            "params": [
                {
                    "name": "body",
                    "desc": "",
                    "lua_type": "string"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "InfluxDBError?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 31,
                "path": "src/influxdbclient/src/Server/Utils/InfluxDBErrorUtils.lua"
            }
        },
        {
            "name": "isInfluxDBError",
            "desc": "Checks if the given data is an InfluxDB error.",
            "params": [
                {
                    "name": "data",
                    "desc": "",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "boolean"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 50,
                "path": "src/influxdbclient/src/Server/Utils/InfluxDBErrorUtils.lua"
            }
        }
    ],
    "properties": [],
    "types": [
        {
            "name": "InfluxDBError",
            "desc": "InfluxDB error type.",
            "fields": [
                {
                    "name": "code",
                    "lua_type": "string",
                    "desc": ""
                },
                {
                    "name": "message",
                    "lua_type": "string",
                    "desc": ""
                }
            ],
            "source": {
                "line": 17,
                "path": "src/influxdbclient/src/Server/Utils/InfluxDBErrorUtils.lua"
            }
        }
    ],
    "name": "InfluxDBErrorUtils",
    "desc": "",
    "source": {
        "line": 5,
        "path": "src/influxdbclient/src/Server/Utils/InfluxDBErrorUtils.lua"
    }
}