Skip to content

Latest commit

 

History

History
107 lines (77 loc) · 6.94 KB

File metadata and controls

107 lines (77 loc) · 6.94 KB

Errors

Overview

Operations involving errors

Available Operations

  • list - List errors

list

This endpoint returns the total number of playback errors that occurred, along with the total number of views captured, based on the specified timespan and filters. It provides insights into the overall playback quality and helps identify potential issues that may impact viewer experience.

Key fields in response

  • percentage: The percentage of views affected by the specific error.
  • uniqueViewersEffectedPercentage: The percentage of unique viewers affected by the specific error (available only in the topErrors section).
  • notes: Additional notes or information about the specific error.
  • message: The error message or description.
  • lastSeen: The timestamp of when the error was last observed.
  • id: The unique identifier for the specific error.
  • description: A description of the specific error.
  • count: The number of occurrences of the specific error.
  • code: The error code associated with the specific error.

Related guide: Troubleshoot errors

Example Usage

import { Fastpix } from "@fastpix/fastpix-node";

const fastpix = new Fastpix({
  security: {
    username: "your-access-token",
    password: "your-secret-key",
  },
});

async function run() {
  const result = await fastpix.errors.list({
    timespan: "24:hours",
    filterby: "browser_name:Chrome",
  });

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { FastpixCore } from "@fastpix/fastpix-node/core.js";
import { errorsList } from "@fastpix/fastpix-node/funcs/errorsList.js";

// Use `FastpixCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const fastpix = new FastpixCore({
  security: {
    username: "your-access-token",
    password: "your-secret-key",
  },
});

async function run() {
  const res = await errorsList(fastpix, {
    timespan: "24:hours",
    filterby: "browser_name:Chrome",
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("errorsList failed:", res.error);
  }
}

run();

Parameters

Parameter Type Required Description
request operations.ListErrorsRequest ✔️ The request object to use for the request.
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retries RetryConfig Enables retrying HTTP requests under certain failure conditions.

Response

Promise<operations.ListErrorsResponse>

Errors

Error Type Status Code Content Type
errors.FastpixDefaultError 4XX, 5XX */*