From 28c5a08a8f771ad527f301e6b5d530c68b4f31df Mon Sep 17 00:00:00 2001 From: Kris Zyp Date: Mon, 8 Jun 2026 22:59:49 -0600 Subject: [PATCH] fix(caching-guide): correct jokeAPI.get() signature in complete example MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The 'Putting It All Together' example used `async get()` with `this.getId()` which throws at runtime. The correct signature is `async get(id)` — consistent with the earlier 'Wrapping an External Data Source' section and the working caching-guide-example repo. Co-Authored-By: Claude Sonnet 4.6 --- learn/developers/caching-with-harper.mdx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/learn/developers/caching-with-harper.mdx b/learn/developers/caching-with-harper.mdx index 567ce76e..c8383603 100644 --- a/learn/developers/caching-with-harper.mdx +++ b/learn/developers/caching-with-harper.mdx @@ -335,8 +335,7 @@ Here is the complete `resources.js` for this guide: // resources.js const jokeAPI = { - async get() { - const id = this.getId(); + async get(id) { const response = await fetch(`https://official-joke-api.appspot.com/jokes/${id}`); return response.json(); },