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

ClientOptions like retryOnError are not updated when using an adapter. #1745

Open
n-eit opened this issue Mar 23, 2023 · 0 comments
Open

ClientOptions like retryOnError are not updated when using an adapter. #1745

n-eit opened this issue Mar 23, 2023 · 0 comments

Comments

@n-eit
Copy link

n-eit commented Mar 23, 2023

Hello,

I'm trying to retrieve the headers of the requests I send to Contentful.

It seems that, when using the cmaAdapter of the sdk, the client created using createClient(params, opts) ignore all the params.

Code

The code I used for creating the client, nor the onError, requestLogger, logHandler seems to display something:

return createClient(
    {
      throttle: 'auto',
      retryOnError: false,
      onError(error) {
        console.log(error);
      },
      requestLogger(value) {
        console.log(value);
      },
      logHandler(level, data) {
        console.log(level);
        console.log(data);
      },
      apiAdapter: sdk.cmaAdapter,
    },
    {
      type: 'plain',
      defaults: {
        spaceId: configuration.spaceId,
        environmentId: configuration.environmentId,
      }
    },
  );

Version

contentful-management: 10.6.0
contentful-sdk-core: 7.0.2

Probably related issue

#contentful/contentful.js#345

Thanks for your time, I am not sure if it's fully a bug on your side, feel free to closed it if not, and I apologize for the inconvenience.

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

No branches or pull requests

1 participant