UNPKG

@rfdez/pvpc-mcp-server

Version:

Fetch the Voluntary Price for the Small Consumer (PVPC) published daily by Red Eléctrica at 8:15 p.m. This includes the hourly electricity tariffs that will apply the following day for consumers billed under the 2.0 TD tariff.

14 lines (13 loc) 366 B
export class PvpcError extends Error { status; constructor(message, name, status = 500) { super(); this.status = status; this.message = message; this.name = name; } static fromResponse(response) { const { status, message } = response; return new PvpcError(message, "ApplicationError", status); } }