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

Reduce payload size for cart methods #5836

Merged
merged 4 commits into from Apr 27, 2021

Conversation

filipsobol
Copy link
Contributor

@filipsobol filipsobol commented Apr 27, 2021

Short Description of the PR

When cart methods are called, we include the whole cart object in the payload sent to the api-client (Server Middleware). This becomes an issue when the cart contains multiple items and uses custom queries to add more properties to it, resulting in an HTTP 413 Payload Too Large error.
This PR fixes it by only sending data that is needed - cart id and version.

Pull Request Checklist

  • I have updated the Changelog (V1) v2 and mentioned all breaking changes in the public API.
  • I have documented all new public APIs and made changes to existing docs mentioning the parts I've changed so they're up to date.
  • I have tested my Pull Request on production build and (to my knowledge) it works without any issues
  • I have followed naming conventions

@filipsobol filipsobol added Next Issues/bugs for Vue Storefront Next commercetools labels Apr 27, 2021
@github-actions github-actions bot added the docs Tasks regarding documentation label Apr 27, 2021
@filipsobol filipsobol merged commit be25fd1 into next Apr 27, 2021
@filipsobol filipsobol deleted the 20210427-reduce-payload-size-for-cart-methods branch May 25, 2021 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
commercetools docs Tasks regarding documentation Next Issues/bugs for Vue Storefront Next
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants