-
Notifications
You must be signed in to change notification settings - Fork 7
[CI-3858] Resolve body with task_id on mutating items and variations functions
#209
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
Conversation
…n the API call response body instead of resolving an empty promise
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking good. Thanks for fixing the tests. Let's also update the types in catalog.d.ts before we merge this in.
src/modules/catalog.js
Outdated
| signal, | ||
| }); | ||
|
|
||
| const body = await response.json(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets move this within the conditional if (response.ok) {. If we return an error, it might not be in json so we'll resolve a json-parse error instead of the http error on line 264. Besides, that's the only place we're using body anyways.
…se.ok check on createOrReplaceItems
Mudaafi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. let's get a second review since this touches a lot of methods
stanlp1
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
createOrReplaceItemsupdateItemsdeleteItemscreateOrReplaceVariationsupdateVariationsdeleteVariationsgetBrowseResultsandFacet Configurationscleanup hook