Skip to content

fix: handle prodapi response field variants - #4

Merged
oliyy merged 1 commit into
mainfrom
fix/prodapi-response-shapes
Jun 9, 2026
Merged

fix: handle prodapi response field variants#4
oliyy merged 1 commit into
mainfrom
fix/prodapi-response-shapes

Conversation

@oliyy

@oliyy oliyy commented Jun 9, 2026

Copy link
Copy Markdown
Owner

Summary

  • tolerate PCHome prodapi integer fields returned as quoted numeric strings, numbers, or nulls
  • preserve field-level decode errors instead of reporting every decode failure as an unexpected response shape
  • add regression coverage for observed product and button payload variants

Root cause

PCHome still returns a keyed product object, but selected fields such as Price.Low and Qty can now vary between JSON numbers, strings, and nulls depending on the product.

Validation

  • go test ./...
  • verified the reported live searches return without product enrichment warnings

@oliyy
oliyy marked this pull request as ready for review June 9, 2026 08:00
@oliyy
oliyy merged commit 6251856 into main Jun 9, 2026
1 check passed
@oliyy
oliyy deleted the fix/prodapi-response-shapes branch June 9, 2026 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant