UBER-EATS-Wrapper/docs/developer-portal/19-menu-troubleshooting-audit.md

35 lines
1.4 KiB
Markdown

# 19 Menu Troubleshooting Audit
Source checked: Uber Eats "Troubleshooting Errors from the Menu API" section shared by you.
## Implemented Now
- Added proactive upload-menu payload validation before calling Uber:
- `No Menus Errors` guard:
- requires `menu.menus` to have at least one entry
- `No Hours Errors` guard:
- requires at least one valid `service_availability` interval
- `Short Hours Errors` guard:
- validates effective contiguous service windows are at least 60 minutes
- supports overnight-contiguous windows split across adjacent days
- `Invalid Visibility Errors` guard:
- detects overlapping `visibility_info.hours[].hours_of_week[].time_periods` for the same day
- Added stronger request path validation:
- menu routes now validate `storeId` as UUID
- helps prevent `invalid uuid` / `orgUUID must be a valid UUID` upstream errors
- Added update-item price sanity check:
- if both provided, `core_price` must be `>= price`
## Mapped to Wrapper
- `PUT /api/v1/uber/menu/replace`
- now runs menu troubleshooting validations before upstream call
- `POST /api/v1/uber/menu/items`
- validates `storeId` UUID and key `price_info` constraints
## Pending
- Live item existence precheck against current menu before sparse update (`nil item` prevention).
- Configurable per-market max price thresholds from Uber approval config.
- User-friendly remediation hints per failing field in structured error payloads.