<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Michael Nganga</title>
    <description>The latest articles on DEV Community by Michael Nganga (@karanja-max).</description>
    <link>https://dev.to/karanja-max</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3610927%2Fa1bff60d-3251-4462-9bd9-3dd23df6b4b8.jpg</url>
      <title>DEV Community: Michael Nganga</title>
      <link>https://dev.to/karanja-max</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/karanja-max"/>
    <language>en</language>
    <item>
      <title>I Built a Recipe Finder App with Vanilla JS and an API. Here's How We Fixed the 404 and 403 Errors.</title>
      <dc:creator>Michael Nganga</dc:creator>
      <pubDate>Sun, 16 Nov 2025 16:23:16 +0000</pubDate>
      <link>https://dev.to/karanja-max/i-built-a-recipe-finder-app-with-vanilla-js-and-an-api-heres-how-we-fixed-the-404-and-403-errors-56bg</link>
      <guid>https://dev.to/karanja-max/i-built-a-recipe-finder-app-with-vanilla-js-and-an-api-heres-how-we-fixed-the-404-and-403-errors-56bg</guid>
      <description>&lt;p&gt;Hey everyone! I just finished a new portfolio project: a Recipe Finder app built with vanilla HTML, CSS, and JavaScript.&lt;/p&gt;

&lt;p&gt;Live Demo: &lt;a href="https://karanja-max.github.io/recipe-finder/" rel="noopener noreferrer"&gt;https://karanja-max.github.io/recipe-finder/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;GitHub Repo: &lt;a href="https://github.com/Karanja-max/recipe-finder" rel="noopener noreferrer"&gt;https://github.com/Karanja-max/recipe-finder&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The app lets you type in ingredients (like "chicken, rice") and uses the Edamam API to show you recipes you can make.&lt;/p&gt;

&lt;p&gt;The Tech Stack:&lt;/p&gt;

&lt;p&gt;JavaScript (ES6+): Used async/await for the fetch call and document.createElement for DOM manipulation.&lt;/p&gt;

&lt;p&gt;CSS Grid: I used grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); to make a perfectly responsive card layout.&lt;/p&gt;

&lt;p&gt;The Real-World Part: Solving API Errors&lt;/p&gt;

&lt;p&gt;This project wasn't just smooth coding. I ran into two major errors:&lt;/p&gt;

&lt;p&gt;HTTP 404 (Not Found): My first fetch calls failed. I had to debug the API docs and found the endpoint had been updated. I fixed it by changing my apiUrl from /search to /api/recipes/v2?type=public.&lt;/p&gt;

&lt;p&gt;HTTP 403 (Forbidden): Even though the URL was correct, I was forbidden! This taught me always to double-check that my API key is 1) correct and 2) actively subscribed to the free plan.&lt;/p&gt;

&lt;p&gt;It was a great lesson in how to debug real-world API issues.&lt;/p&gt;

&lt;p&gt;This was a super fun project for practicing core JS skills. What's your favorite small project for practicing API calls? Let me know!&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>api</category>
      <category>showdev</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
