Skip to content
Snippets Groups Projects
Unverified Commit 6452cd3c authored by Nicolò Pretto's avatar Nicolò Pretto Committed by GitHub
Browse files

feat(sdk): refactor the auth code to provide better error messages (#49214)


* refactor + more specific auth errors

* fix linting issues

* make tests pass, again

* make test pass for real?

* continues the refactor and hopefully makes tests pass

* try to simplify the logic a little bit more

* also logs to the console for the edge case of invalid session

* remove setLoginStatus

* fix typo

* fix debug line that should have been commented

* remove dead code

* remove test for code that doesnt exist

* address feedback from PR

* update test copy

* Update enterprise/frontend/src/embedding-sdk/store/auth.ts

Co-authored-by: default avatarMahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>

* Update enterprise/frontend/src/embedding-sdk/store/auth.ts

Co-authored-by: default avatarMahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>

* update copy for site settings error

* ex -> exception

* Update enterprise/frontend/src/embedding-sdk/store/auth.ts

Co-authored-by: default avatarMahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>

* Update enterprise/frontend/src/embedding-sdk/store/auth.ts

Co-authored-by: default avatarMahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>

* update tests to use the updated copy + small typos

* refactor: use jest spy on to check for console.error
Co-authored-by: default avatar"Mahatthana (Kelvin) Nomsawadi" <me@bboykelvin.dev>

* use full error message in test

* renamed response to session

* mock implementation of console.log

* fix(49482): don't create a new store on each MetabaseProvider render (#49492)

* fix(49482): don't create a new store on each MetabaseProvider render

* remove store prop as it seems to not be used

---------

Co-authored-by: default avatarMahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
parent 3e33ab4c
No related branches found
No related tags found
No related merge requests found
Showing
with 433 additions and 280 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment