Skip to content

API ReferenceErrorsClass

PriceFeedNotFoundError

Error thrown when no single Pyth price feed can be resolved for a token: Hermes returned no feed for the token’s symbol, or more than one. The feed lookup wraps it in a PriceServerError, so callers that already catch PriceServerError keep working; use error.walk(PriceFeedNotFoundError) to tell “this token has no feed” from a transport failure.

Extends

Constructors

Constructor

new PriceFeedNotFoundError(
message,
symbol,
cause?
): PriceFeedNotFoundError;

Parameters

ParameterType
messagestring
symbolstring
cause?unknown

Returns

PriceFeedNotFoundError

Overrides

BaseError.constructor

Properties

symbol

readonly symbol: string;

Methods

walk()

walk<T>(errorType): T | undefined;

Checks if the provided ErrorType is in the error hierarchy for the current error.

Type Parameters

Type ParameterDescription
T extends ErrorThe type of the error being searched for.

Parameters

ParameterTypeDescription
errorType(…args) => TThe error type to find.

Returns

T | undefined

The error, if it is found in the hierarchy, otherwise undefined.

Inherited from

BaseError.walk