Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(answer): error handling #4146

Merged
merged 1 commit into from
Jul 9, 2024

Conversation

dmgauthier
Copy link
Contributor

@dmgauthier dmgauthier commented Jul 4, 2024

Summary

Updates to the Answer Api client to make sure the error handling is proper. Some little extras needed for it to work proper that will make the subsequent review a bit easier.

Why

The Answer Api is almost just a proxy for the stream coming from reveal. And for some technical reasons, the call to the answer api will return an error message but will not return downright error status codes like 400s when the stream fails.
That said, we can rely on the stream end message in case the stream is not working properly, and since its better to give the user or the devs all the information we can, this increment makes sure that the error will appear in the logs and in the state in case we want to leverage the error message in the front end component.

SVCC-3827

@dmgauthier dmgauthier marked this pull request as ready for review July 4, 2024 13:51
@dmgauthier dmgauthier requested a review from a team as a code owner July 4, 2024 13:51
@dmgauthier dmgauthier requested review from fpbrault, fbeaudoincoveo, alexprudhomme and pathiery and removed request for a team July 4, 2024 13:51
@developer-experience-bot
Copy link
Contributor

developer-experience-bot bot commented Jul 4, 2024

Pull Request Report

PR Title

✅ Title follows the conventional commit spec.

Live demo links

Bundle Size

File Old (kb) New (kb) Change (%)
case-assist 206 244.8 18.8
commerce 300.4 339.2 12.9
search 375.2 411.7 9.7
insight 355.3 391.7 10.2
product-listing 267.7 306.5 14.5
product-recommendation 172.2 211 22.5
recommendation 219.1 257.9 17.7
ssr 367.6 404.2 9.9

SSR Progress

Use case SSR (#) CSR (#) Progress (%)
search 39 44 89
recommendation 0 4 0
product-recommendation 0 10 0
product-listing 0 13 0
case-assist 0 6 0
insight 0 27 0
commerce 0 15 0
Detailed logs search : buildInteractiveResult
search : buildInteractiveInstantResult
search : buildInteractiveRecentResult
search : buildInteractiveCitation
search : buildGeneratedAnswer
recommendation : missing SSR support
product-recommendation : missing SSR support
product-listing : missing SSR support
case-assist : missing SSR support
insight : missing SSR support
commerce : missing SSR support

@dmgauthier dmgauthier force-pushed the feat-SVCC-3827-answerapi-headless-controller-preparation branch from 8847e7b to 06d09e4 Compare July 8, 2024 13:32
@dmgauthier dmgauthier force-pushed the feat-svcc-3827-answer-api-error-handling branch from c2a4ec9 to 6a1a472 Compare July 8, 2024 16:46
@dmgauthier dmgauthier force-pushed the feat-SVCC-3827-answerapi-headless-controller-preparation branch from 06d09e4 to d863c97 Compare July 8, 2024 16:48
@dmgauthier dmgauthier force-pushed the feat-svcc-3827-answer-api-error-handling branch from 6a1a472 to dc6edc9 Compare July 8, 2024 16:59
@dmgauthier dmgauthier force-pushed the feat-SVCC-3827-answerapi-headless-controller-preparation branch from d863c97 to 34143ba Compare July 8, 2024 17:35
@dmgauthier dmgauthier force-pushed the feat-SVCC-3827-answerapi-headless-controller-preparation branch from c4685cc to 953948d Compare July 9, 2024 14:41
@dmgauthier dmgauthier requested review from a team as code owners July 9, 2024 14:41
@dmgauthier dmgauthier requested review from erocheleau, SimonMilord and mmitiche and removed request for a team July 9, 2024 14:41
@dmgauthier dmgauthier force-pushed the feat-svcc-3827-answer-api-error-handling branch from 31aff41 to 040ebd3 Compare July 9, 2024 14:57
@dmgauthier dmgauthier force-pushed the feat-SVCC-3827-answerapi-headless-controller-preparation branch 3 times, most recently from 4fee423 to bf21cf8 Compare July 9, 2024 18:49
@dmgauthier dmgauthier force-pushed the feat-svcc-3827-answer-api-error-handling branch from 040ebd3 to 82fb824 Compare July 9, 2024 18:55
Base automatically changed from feat-SVCC-3827-answerapi-headless-controller-preparation to master July 9, 2024 19:36
@dmgauthier dmgauthier force-pushed the feat-svcc-3827-answer-api-error-handling branch from 82fb824 to 9a6b3c9 Compare July 9, 2024 19:43
@dmgauthier dmgauthier enabled auto-merge July 9, 2024 19:43
@dmgauthier dmgauthier added this pull request to the merge queue Jul 9, 2024
Merged via the queue into master with commit cd679cc Jul 9, 2024
92 checks passed
@dmgauthier dmgauthier deleted the feat-svcc-3827-answer-api-error-handling branch July 9, 2024 20:31
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.

5 participants