Closed Bug 1846071 Opened 3 years ago Closed 3 years ago

Consider adding logic that detects invalid letter grades before rendering the review reliability component

Categories

(Firefox Graveyard :: Shopping, defect, P3)

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: kpatenio, Unassigned)

References

Details

(Whiteboard: [fidefe-shopping])

Attachments

(1 file)

While testing code locally, I noticed that we receive a grade: "?" from the API for some product pages. Ex. https://www.amazon.com/dp/B07QH7ZXH3

Although this will likely be fixed from the backend, I wanted to file this ticket in case we're interested in updating how we render the review-reliability component. Currently, we check if the grade is null before proceeding to render the reliability component. But we don't take into account what the string values passed in are. We only check if valid letters are passed once we render the letter grade component.

Severity: -- → S3
Priority: -- → P3
Whiteboard: [fidefe-shopping]
Summary: Considering adding logic that detects invalid letter grades before rendering the review reliability component → Consider adding logic that detects invalid letter grades before rendering the review reliability component

Niklas pointed out the returned data can be like: needs_analysis: false, grade: "?", highlights: {}.
Perhaps we get this when a product doesn't have enough reviews? If so, this is equally relevant to Bug 1844828.

See Also: → 1840466
See Also: → 1844828

The "?" grade was a bug on the fakespot side--the API should never return the "?" grade. This should be fixed on staging; once verified, I think we're good to close this. For future reference, the fakespot tracking bug was https://mozilla-hub.atlassian.net/browse/FAK-202

Flags: needinfo?(kpatenio)

eh, closing.

Note that, if we choose to set validation to be strict in production, an unexpected letter grade will throw an error and not be displayed at all. (I don't know if we want to go that far, but it's something we'll want to discuss)

Status: NEW → RESOLVED
Closed: 3 years ago
Flags: needinfo?(kpatenio)
Resolution: --- → INVALID
Product: Firefox → Firefox Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: