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

Fix issue with intermittent promise rejection error #1859

Merged
merged 4 commits into from
Jul 3, 2023

Conversation

ajimae
Copy link
Contributor

@ajimae ajimae commented Jun 18, 2023

Summary

Serialization of response object throws unhandled promise rejection errors

Description

Intermittent unhandled promise rejection errors occurs due to bad object serialization.

Todo

  • add an error catch block to handle serialization errors

Related Issues

#1858
DEVX-180 - Jira

@changeset-bot
Copy link

changeset-bot bot commented Jun 18, 2023

🦋 Changeset detected

Latest commit: f2907a1

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@commercetools/sdk-middleware-http Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@ajimae ajimae self-assigned this Jun 18, 2023
@codecov
Copy link

codecov bot commented Jun 18, 2023

Codecov Report

Merging #1859 (f2907a1) into master (60ba4f8) will increase coverage by 0.03%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #1859      +/-   ##
==========================================
+ Coverage   94.68%   94.71%   +0.03%     
==========================================
  Files         145      145              
  Lines        4988     4998      +10     
  Branches     1363     1365       +2     
==========================================
+ Hits         4723     4734      +11     
+ Misses        262      261       -1     
  Partials        3        3              
Impacted Files Coverage Δ
packages/sdk-middleware-http/src/http.js 96.59% <100.00%> (+0.97%) ⬆️

Copy link
Member

@markus-azer markus-azer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty nice 💯 , just left some thoughts.

packages/sdk-middleware-http/src/http.js Outdated Show resolved Hide resolved
ajimae and others added 4 commits July 3, 2023 16:54
…rror

- add an error catch block to handle serialization errors
- DEVX-180 write tests for new bug fix
- use correct error class for error handling.
- change network error to server error
@ajimae ajimae force-pushed the fix/issue-with-intermittent-promise-rejection-error branch from bb04290 to f2907a1 Compare July 3, 2023 14:54
@ajimae ajimae merged commit 0ffe724 into master Jul 3, 2023
6 checks passed
@ajimae ajimae deleted the fix/issue-with-intermittent-promise-rejection-error branch July 3, 2023 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants