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

fix: fixing missing token when call sdk methods using Promises #789

Merged
merged 6 commits into from
May 16, 2022

Conversation

pedroharbs
Copy link
Contributor

Fixing missing token problem when call SDK methods with multiple promises, reported by @peternic.

@pedroharbs pedroharbs requested a review from a team April 29, 2022 08:58
@cognite-ornellas cognite-ornellas self-requested a review May 12, 2022 13:07
@codecov
Copy link

codecov bot commented May 13, 2022

Codecov Report

Merging #789 (dbe9ed3) into master (de3557f) will increase coverage by 1.24%.
The diff coverage is 81.04%.

@@            Coverage Diff             @@
##           master     #789      +/-   ##
==========================================
+ Coverage   84.06%   85.31%   +1.24%     
==========================================
  Files          70       90      +20     
  Lines        1952     2649     +697     
  Branches      249      347      +98     
==========================================
+ Hits         1641     2260     +619     
- Misses        301      376      +75     
- Partials       10       13       +3     
Impacted Files Coverage Δ
packages/beta/src/cogniteClient.ts 100.00% <ø> (ø)
packages/core/src/httpClient/httpError.ts 90.00% <ø> (ø)
packages/core/src/testUtils.ts 35.59% <0.00%> (-19.58%) ⬇️
...stable/src/api/entityMatching/entityMatchingApi.ts 37.14% <ø> (ø)
packages/stable/src/retryValidator.ts 100.00% <ø> (ø)
packages/core/src/baseResourceApi.ts 34.22% <17.39%> (-4.84%) ⬇️
packages/stable/src/api/projects/projectsApi.ts 78.94% <20.00%> (-21.06%) ⬇️
packages/stable/src/api/3d/assetMappings3DApi.ts 79.16% <28.57%> (-20.84%) ⬇️
...s/playground/src/api/functions/functionCallsApi.ts 29.62% <29.62%> (ø)
packages/stable/src/api/geospatial/featureAPI.ts 40.00% <40.00%> (ø)
... and 102 more

@cognite-ornellas cognite-ornellas changed the title fix: fixing missing token when call sdk methods using Promises fix(core): fixing missing token when call sdk methods using Promises [release] May 16, 2022
@pedroharbs pedroharbs changed the title fix(core): fixing missing token when call sdk methods using Promises [release] fix(core): fixing missing token when call sdk methods using Promises May 16, 2022
@pedroharbs pedroharbs changed the title fix(core): fixing missing token when call sdk methods using Promises fix: fixing missing token when call sdk methods using Promises May 16, 2022
@pedroharbs pedroharbs merged commit 6a6d62a into master May 16, 2022
@pedroharbs pedroharbs deleted the fix/missing_token branch May 16, 2022 11:03
cognite-ornellas pushed a commit that referenced this pull request May 16, 2022
* fix: fixing missing token when call sdk methods using Promises

* fix: adding promises again and solving 401 problem

* fix: fixing tests

* fix: puting back Promise.resolve to auth doc

* fix: 401 retry logic for apikey and oidc

Co-authored-by: cognite-ornellas <rodrigo.ornellas@cognite.com>
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 this pull request may close these issues.

3 participants