Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/twenty-monkeys-glow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/kit': patch
---

Improve error message when prefetching fails
2 changes: 1 addition & 1 deletion packages/kit/src/runtime/client/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ export function create_client({ target, base, trailing_slash }) {
const intent = get_navigation_intent(url, false);

if (!intent) {
throw new Error('Attempted to prefetch a URL that does not belong to this app');
throw new Error(`Attempted to prefetch a URL that does not belong to this app: ${url}`);
}

load_cache = { id: intent.id, promise: load_route(intent) };
Expand Down