contentful-management.js
contentful-management.js copied to clipboard
ClientOptions like retryOnError are not updated when using an adapter.
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
#https://github.com/contentful/contentful.js/issues/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.