@neynar/nodejs-sdk
Version:
SDK to interact with Neynar APIs (https://docs.neynar.com/reference/quickstart)
10 lines (9 loc) • 435 B
TypeScript
import { AxiosError } from "axios";
import type { SetRequired } from "type-fest";
import { ErrorRes } from "../api";
/**
* Utility for parsing errors returned by the Neynar API servers. Returns true
* if the given error is caused by an error response from the server, and
* narrows the type of `error` accordingly.
*/
export declare const isApiErrorResponse: (error: any) => error is SetRequired<AxiosError<ErrorRes>, "response">;