Skip to content

fix(robotoff): handle 502 errors with user-friendly message in nutrient extraction#450

Open
Mounika-max-348 wants to merge 1 commit intoopenfoodfacts:mainfrom
Mounika-max-348:fix/robotoff-502-error-handling
Open

fix(robotoff): handle 502 errors with user-friendly message in nutrient extraction#450
Mounika-max-348 wants to merge 1 commit intoopenfoodfacts:mainfrom
Mounika-max-348:fix/robotoff-502-error-handling

Conversation

@Mounika-max-348
Copy link
Copy Markdown

What

  • Added error handling for 502 (Bad Gateway) errors in the Robotoff API
  • Updated insights() and questionsByProductCode() in robotoff.ts to throw a meaningful error when the API returns a non-OK response
  • Updated the robotoff-nutrient-extraction component to display a user-friendly message when Robotoff is unavailable (502 error) instead of showing a raw error

Screenshot

Fixes bug(s)

Part of

@vercel
Copy link
Copy Markdown

vercel Bot commented Feb 27, 2026

@Mounika-max-348 is attempting to deploy a commit to the openfoodfacts Team on Vercel.

A member of the Team first needs to authorize it.

@Mounika-max-348
Copy link
Copy Markdown
Author

Hi @teolemon! I've fixed issue #386 by adding 502 error handling in robotoff.ts and displaying a user-friendly message in the nutrient extraction component when Robotoff is unavailable. Please review and let me know if any changes are needed. 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant