Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
basilesimon opened this issue Aug 26, 2021 · 1 comment
Open

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

basilesimon opened this issue Aug 26, 2021 · 1 comment
Labels
about:ui help wanted Extra attention is needed

Comments

@basilesimon
Copy link
Member

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()

@basilesimon basilesimon added help wanted Extra attention is needed about:ui labels Aug 26, 2021
@basilesimon
Copy link
Member Author

Must reassess in light of this other PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
about:ui help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant