commercetools-sdk-typescript icon indicating copy to clipboard operation
commercetools-sdk-typescript copied to clipboard

Better error message on failed http request

Open sfernengel opened this issue 3 years ago • 2 comments

When we get a 404, the returned error is empty and not helpful. Make sure we report at least the url and the status text in that case.

sfernengel avatar Apr 27 '22 12:04 sfernengel

⚠️ No Changeset found

Latest commit: a9122384b8b6b16315a8fd922801fa5296b018c7

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

changeset-bot[bot] avatar Apr 27 '22 12:04 changeset-bot[bot]

I would like to know the response you got in your console when .withLoggerMiddleware() is included when creating the client.

I still get no error message: node index.js

Error
    at executeRequest (/Users/sevtap/Code/buggy_store/node_modules/@commercetools/sdk-client-v2/dist/commercetools-sdk-client-v2.cjs.dev.js:360:19)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

sfernengel avatar May 02 '22 07:05 sfernengel

Changes no longer needed.

ajimae avatar Feb 12 '24 11:02 ajimae