Day 6 Mission 01 Fixing errors

Mission 01. Fix Errors with AI (Error Troubleshooting)

Dig into CORS and parsing errors from server calls and JSON handling with AI, and record an error report.

Mission 01 Mission 01 Error Fixing Lab Guide

📥 Lab input

  • • day6_meeting_notes.md (meeting notes)

💾 Lab output

  • • day6_error_report.md

1. Story and lab background

After making the dashboard prototype and building the API data fetch feature, unexpected errors happened one after another while testing with a mock server. Get Codex's diagnosis to trace the cause, and finally prove that the result runs reliably.

2. Learning goals

  • Identify HTTP Status 404 and CORS failures when calling a mock server.
  • Understand the root parsing cause of a SyntaxError when the Response's JSON format is broken.
  • Write an error report covering the fixes made and how to prevent it from happening again.

🛠️ Follow-along lab guide

  1. Create the lab file: press the download button below and save day6_meeting_notes.md in the automation/ folder.
  2. CORS/JSON parsing diagnosis: give Codex Client the error messages you collected and your original code, and have it explain the structural cause and effect.
  3. Save the error report: write and check an error report (`day6_error_report.md`) based on AI's diagnosis and suggested fix guidelines.

Download lab materials

Codex request prompt

Mission 01 Prompt
Based on the 'SyntaxError: Unexpected token < in JSON' error message from the server call and the code file, build a final debugging report (Error Report) covering why the error happened and the fix code.

4. Example output

Codex analyzes the meeting notes and outputs a normalized data entity mapping and Mermaid ERD script like below.

FileError typeDiagnosed causeFix
day6_error_report.mdSyntaxError: Unexpected token < in JSONA typo in the server URL returns an HTML 404 responseFix the URL and check content-type

5. AI use points

  • CORS/parsing cause analysis: compares domain differences between server and client, or differences in HTTP response content types.
  • Prevention matrix: builds a format-handling utility guide so the same problem doesn't happen when calling other APIs later.