Skip to content

Error in fetchEtas #14

@Mantou1233

Description

@Mantou1233
TypeError: fetch failed
    at Object.fetch (node:internal/deps/undici/undici:11576:11)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  cause: AggregateError
      at internalConnectMultiple (node:net:1114:18)
      at afterConnectMultiple (node:net:1667:5) {
    code: 'ECONNREFUSED',
    [errors]: [ [Error], [Error] ]
  }
}
[]

This is always reported when using fetchEtas.
sample code:

const bus = require("hk-bus-eta");

bus.fetchEtaDb().then((busDb) => {
    bus.fetchEtas({
        ...busDb.routeList["1+1+CHUK YUEN ESTATE+STAR FERRY"],
        seq: 0,
        language: "en",
    }).then(etas => {
        console.log(etas)
    })
})

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions