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

Undefined headers in successful responses #282

Open
Sirach99 opened this issue Mar 24, 2024 · 4 comments · May be fixed by #286
Open

Undefined headers in successful responses #282

Sirach99 opened this issue Mar 24, 2024 · 4 comments · May be fixed by #286

Comments

@Sirach99
Copy link

Sirach99 commented Mar 24, 2024

Which SDK version are you using?

19.0.2

What's the issue? / Observed Results

Headers are undefined in successful responses. Like

{
  headers: undefined, 
  ...
}

However, headers are set correctly in errored responses. Like

{
  headers: Object [AxiosHeaders] {'x-app-usage': ...}, 
  ...
}

This has been a frequently requested fix, see:
#87 (comment)
#219
#220

Steps/Sample code to reproduce the issue

  1. Make a request. (I called user.getAdAccounts)
  2. Log headers
  3. Confirm they are undefined in successful responses.

Expected Results:

Headers to contain values such as x-app-usage and x-fb-ads-insights-throttle.
This is very important for throttling API calls.

cc: @stcheng

@Sirach99
Copy link
Author

Sirach99 commented Apr 2, 2024

Any updates here, @stcheng?

@stcheng
Copy link
Contributor

stcheng commented Apr 2, 2024

@Sirach99 it seems that multiple fixes have been merged. Were you able to determine if the past fixes addressed the issue and debug it to figure out the problem?

@Sirach99 Sirach99 linked a pull request Apr 15, 2024 that will close this issue
@Sirach99
Copy link
Author

Sirach99 commented Apr 15, 2024

Hi @stcheng, sorry for the delay. The PR I just added results in displaying the headers as expected.

However, the x-fb-ads-insights-throttle header is still missing for Marketing API calls. Could you please investigate that when you get the chance?

@Sirach99
Copy link
Author

Accidentally was not making call to Insights API. Now that I am, I see the x-fb-ads-insights-throttle header.

PR solves header issue I was having 👍

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

Successfully merging a pull request may close this issue.

2 participants