Skip to content

"Invalid URL" TypeError from the UI as it talks to the API #61

Description

@basilesimon

Since we've moved to SvelteKit, the available fetch object is a little different... which requires an absolute URL, otherwise this error crops up:

(node:96340) UnhandledPromiseRejectionWarning: TypeError [ERR_INVALID_URL]: Invalid URL: /api/list-docs
    at onParseError (internal/url.js:279:9)
    at new URL (internal/url.js:355:5)

See ui/src/lib/Ledger/index.ts for the culprits:

const res = await fetch(`api/list-docs`);

This issue outlines that we need to move to this initial load()

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions