Skip to content

Conversation

@WojtekTheWebDev
Copy link
Collaborator

🔗 Linked issue

❓ Type of change

  • 📖 Documentation (updates to the documentation, readme or JSDoc annotations)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

Adds customizable error handler.

📝 Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@WojtekTheWebDev WojtekTheWebDev requested a review from a team as a code owner February 22, 2024 11:43
@changeset-bot
Copy link

changeset-bot bot commented Feb 22, 2024

⚠️ No Changeset found

Latest commit: 04d8110

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

Base automatically changed from feat/IN-3860-moduleFromEndpoints-httpClient to feat/moduleFromEndpoints March 4, 2024 11:27
@WojtekTheWebDev WojtekTheWebDev requested a review from jagoral March 4, 2024 12:06
@WojtekTheWebDev WojtekTheWebDev requested a review from jagoral March 4, 2024 12:46
@WojtekTheWebDev WojtekTheWebDev merged commit 5b1feeb into feat/moduleFromEndpoints Mar 4, 2024
@WojtekTheWebDev WojtekTheWebDev deleted the feat/IN-3860-error-handler branch March 4, 2024 13:25
WojtekTheWebDev added a commit that referenced this pull request Mar 11, 2024
* refactor: rename module dir to modules

* feat: new SDK module - moduleFromEndpoints

* Update packages/sdk/src/__tests__/integration/modules/moduleFromEndpoints.spec.ts

Co-authored-by: Tomasz Góral <tomasz.gl69@gmail.com>

* feat: HTTP Client for moduleForEndpoints (#7053)

* feat: default behaviour of HTTP Client

* remove isomorphic-fetch from depts

* full implementation of HTTP client

* test: update tests based on the review

* fix issue with URL class and urls as paths

* add test for axios

* add computed headers to http client

* update tsdocs

* feat: add customizable error handler (#7054)

* feat: default behaviour of HTTP Client

* remove isomorphic-fetch from depts

* full implementation of HTTP client

* feat: add customizable error handler

* await error handler

* update error handler due to feedback

* update tsdocs

* refactor default http client

* use unknown instead of any

* add method name to error handler

* update tsdocs

* apply review suggestions

* refactor: simplification & improve tsdocs (#7055)

* feat: default behaviour of HTTP Client

* remove isomorphic-fetch from depts

* full implementation of HTTP client

* feat: add customizable error handler

* await error handler

* refactor: improve tsdocs

* test non-object params

* add comment

* add module types to api extractor

* fix: issue with custom methods in new module (#7056)

* feat: default behaviour of HTTP Client

* remove isomorphic-fetch from depts

* full implementation of HTTP client

* feat: add customizable error handler

* await error handler

* refactor: improve tsdocs

* fix: issue with custom methods in new module

* test: additonal tests

* fix issue with losing tsdocs

* rename file

* missing import

* include credentials

* Update packages/sdk/src/modules/moduleFromEndpoints/types.ts

Co-authored-by: Łukasz Śliwa <39009379+lsliwaradioluz@users.noreply.github.com>

---------

Co-authored-by: Łukasz Śliwa <39009379+lsliwaradioluz@users.noreply.github.com>

* update tsdocs

* rename module to middlewareModule

---------

Co-authored-by: Tomasz Góral <tomasz.gl69@gmail.com>
Co-authored-by: Łukasz Śliwa <39009379+lsliwaradioluz@users.noreply.github.com>
WojtekTheWebDev added a commit that referenced this pull request Mar 12, 2024
* refactor: rename module dir to modules

* feat: new SDK module - moduleFromEndpoints

* feat: default behaviour of HTTP Client

* remove isomorphic-fetch from depts

* full implementation of HTTP client

* feat: add customizable error handler

* await error handler

* refactor: improve tsdocs

* fix: issue with custom methods in new module

* test: additonal tests

* fix issue with losing tsdocs

* prerelease

* fix header type

* revert last fix

* chore: bump package

* refactor: use moduleFromEndpoints in next

* refactor: update shared

* refactor: update nuxt package

* refactor: easeier setup

* chore: fix version

* Update packages/sdk/src/__tests__/integration/modules/moduleFromEndpoints.spec.ts

Co-authored-by: Tomasz Góral <tomasz.gl69@gmail.com>

* feat: HTTP Client for moduleForEndpoints (#7053)

* feat: default behaviour of HTTP Client

* remove isomorphic-fetch from depts

* full implementation of HTTP client

* test: update tests based on the review

* fix issue with URL class and urls as paths

* add test for axios

* add computed headers to http client

* update tsdocs

* feat: add customizable error handler (#7054)

* feat: default behaviour of HTTP Client

* remove isomorphic-fetch from depts

* full implementation of HTTP client

* feat: add customizable error handler

* await error handler

* update error handler due to feedback

* update tsdocs

* refactor default http client

* use unknown instead of any

* add method name to error handler

* update tsdocs

* apply review suggestions

* refactor: simplification & improve tsdocs (#7055)

* feat: default behaviour of HTTP Client

* remove isomorphic-fetch from depts

* full implementation of HTTP client

* feat: add customizable error handler

* await error handler

* refactor: improve tsdocs

* test non-object params

* add comment

* add module types to api extractor

* fix: issue with custom methods in new module (#7056)

* feat: default behaviour of HTTP Client

* remove isomorphic-fetch from depts

* full implementation of HTTP client

* feat: add customizable error handler

* await error handler

* refactor: improve tsdocs

* fix: issue with custom methods in new module

* test: additonal tests

* fix issue with losing tsdocs

* rename file

* missing import

* include credentials

* Update packages/sdk/src/modules/moduleFromEndpoints/types.ts

Co-authored-by: Łukasz Śliwa <39009379+lsliwaradioluz@users.noreply.github.com>

---------

Co-authored-by: Łukasz Śliwa <39009379+lsliwaradioluz@users.noreply.github.com>

* bump version

* use new version

* refactor: use getRequestHeaders naming for both nuxt and next

* update tsdocs

* rename module to middlewareModule

* bump sdk package

* use middlewareModule naming

* use strict mode in storefront packages

* deprecate getCookieHeader

* refactor

* first try to fix the yarn.lock

* add prettier

* revert

* update sdk package

* exit pre mode and refactor

* add prettier

* add changelogs and bump packages

* apply review suggestions

* apply review suggestions pt2

---------

Co-authored-by: Tomasz Góral <tomasz.gl69@gmail.com>
Co-authored-by: Łukasz Śliwa <39009379+lsliwaradioluz@users.noreply.github.com>
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.

4 participants