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: Session.call throws wrong error type for server errors #112

Merged

Conversation

mertkirbuga
Copy link
Contributor

Resolves FTRACK-98698b84-0f46-424e-a03d-7d92f606d82f

  • I have added automatic tests where applicable
  • The PR title is suitable as a release note
  • The PR contains a description of what has been changed
  • The description contains manual test instructions

Changes

This PR consists the changes related with session.call function's error handling. When response is tried to be decoded and if error has been encountered while doing that, it will match with MalformedResponseError. Other errors will be already handled by getErrorFromResponse until then except AbortError. Since the error has been already handled, error reason can be directly thrown.

Test

This flow can be tested with 2FA feature on Studio or Review. However, other session.call error cases should be tested.

@mertkirbuga mertkirbuga requested a review from a team as a code owner May 26, 2023 13:21
Copy link
Contributor

@lucaas lucaas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good to me.

Consider updating the PR title to work better as a release note: "fix: this is the issue"

@mertkirbuga mertkirbuga changed the title fix: session.call function error handling is changed and tests added fix: session.call function returns wrong error format May 26, 2023
@lucaas lucaas changed the title fix: session.call function returns wrong error format fix: Session.call throws MalformedResponseError error for server errors May 29, 2023
@lucaas lucaas changed the title fix: Session.call throws MalformedResponseError error for server errors fix: Session.call throws wrong error type for server errors May 29, 2023
@mertkirbuga mertkirbuga merged commit 452095e into main May 30, 2023
@mertkirbuga mertkirbuga deleted the backlog/2fa-dialog-does-not-show-error-messages-for-user branch May 30, 2023 07:37
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.

2 participants