Internal Bug Report Template

Overview

Template for escalating valid bugs to the Engineering Team with proper context and reproduction steps.

Priority

High - Affects Production Data

Bug Report Template


Status: Open
Priority: High (Affects Production Data)
Date: 2026-01-02
Reported By: Roki Miftah Kamaludin - CSE

1. Issue Summary

Title: Google Shopping API returns 500 Internal Server Error when searching for specific EAN-13 codes.

Description: A customer reported that searching for a specific product by its EAN code causes the API to crash with a 500 error instead of returning a 404 or empty result set. This happens consistently on the Shopping Graph engine.

2. Technical Details

  • Engine: google_shopping
  • Parameters: q, gl, hl
  • Affected User ID: usr_12345 (Mock ID)
  • Search ID (Metadata): 65a1b2c3d4e5f6g7h8

3. Steps to Reproduce

Verification Status

I have verified this using the provided script in /cases/03-error-handling/reproduce_bug.js

  1. Make a GET request to SerpApi with the following parameters:

    {
      "engine": "google_shopping",
      "q": "EAN:8992345678901",
      "gl": "id",
      "hl": "id"
    }
  2. Observe the HTTP Response Status Code.

Expected Behavior: API should return 200 OK with an empty shopping_results array, OR a 404 Not Found.

Actual Behavior: API returns 500 Internal Server Error.

4. Error Logs / Output

Response body received:

{
  "error": "SerpApi::Search::InternalServerError",
  "status": 500,
  "search_metadata": {
    "id": "65a1b2c3d4e5f6g7h8",
    "status": "Error",
    "created_at": "2026-01-02 10:00:00 UTC"
  }
}

5. Impact Analysis

Customer Impact

Moderate - The customer's application crashes because they do not handle 500 errors gracefully.

Business Impact

  • Affects production workflows
  • May cause customer churn if unresolved
  • Creates support ticket backlog

Workaround Provided

Advised customer to wrap the request in a try-catch block and treat 500 errors as "No Results" temporarily.

try {
  const json = await getJson(params);
  // process results
} catch (error) {
  if (error.status === 500) {
    console.log("Treating as no results found");
    // fallback logic
  }
}

6. Suggested Fix (Optional)

It seems the parser fails when Google returns a specific "No results found" HTML layout for EAN searches.

Potential Root Cause:

  • CSS selector for empty state detection may need updating in the GoogleShopping parser
  • Edge case handling for EAN format queries

Recommended Action: Update the empty state detection logic to gracefully handle EAN-13 format queries that return no results.


Key Principles for Bug Reports

Effective Bug Reports

Good bug reports are reproducible, detailed, and include customer impact analysis.

Essential Components:

  1. Clear Title - One sentence summary
  2. Reproduction Steps - Exact steps to reproduce
  3. Expected vs Actual - What should happen vs what does happen
  4. Error Logs - Raw error output
  5. Impact Analysis - How it affects customers
  6. Workaround - Temporary solution provided to customer
  7. Suggested Fix - Optional but shows technical understanding

Don'ts:

  • Don't report without verifying reproduction
  • Don't escalate without trying workarounds first
  • Don't include sensitive customer data
  • Don't exaggerate severity