Interface ImageFallbackEvent

Payload emitted on the image:fallback event when a provider in the chain fails and the proxy advances to the next candidate.

Example

emitter.on('image:fallback', (evt: ImageFallbackEvent) => {
console.warn(`${evt.from} -> ${evt.to}: ${evt.reason}`);
});
interface ImageFallbackEvent {
    type: "image:fallback";
    from: string;
    to: string;
    reason: string;
}

Properties

Properties

type: "image:fallback"

The event discriminator. Always 'image:fallback'.

from: string

Identifier of the provider that failed.

to: string

Identifier of the provider that will be tried next.

reason: string

Human-readable reason for the fallback (error message or "not supported").