Getting type error when adding includeResponseHeaders: boolean to ManagementClientOptions

We want to get headers in response body, so following this documentation Management Client, I tried to enable it but getting this error

Argument of type '{ domain: string; token: string; includeResponseHeaders: boolean; }' is not assignable to parameter of type 'ManagementClientOptions'.
  Object literal may only specify known properties, and 'includeResponseHeaders' does not exist in type 'ManagementClientOptions'.

current package versions are auth0: “@types/auth0”: “2.35.9”, “auth0”: “3.2.0”,
Still getting same error what to do?

Hi @karthik.jeeva :wave:

This issue is being raised from the @types/auth0 package you are using. Through digging into their repository I can see that the ManagementClientOptions interface is missing the includeResponseHeaders property.

As this package is not maintained by Auth0, I would recommend raising an issue with the package maintainer (Definitely Typed) to have this rectified. In the meantime, you may be better served by moving to a new package or defining your own types.

1 Like

Hi @james.merrigan , Thanks for answering, we extending the interfaces by auth0 getting headers now. Also will raise issue with maintainer.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.