-
Notifications
You must be signed in to change notification settings - Fork 2.1k
feat: add customizable error handler #7054
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: add customizable error handler #7054
Conversation
|
* 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>
* 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>
🔗 Linked issue
❓ Type of change
📚 Description
Adds customizable error handler.
📝 Checklist