Skip to content
This repository was archived by the owner on Jan 5, 2026. It is now read-only.

port: [#4432] Expired JWT token exception not being handled (#6572) - #4436

Merged
tracyboehrer merged 3 commits into
mainfrom
southworks/add/expired-token-exception
May 5, 2023
Merged

port: [#4432] Expired JWT token exception not being handled (#6572)#4436
tracyboehrer merged 3 commits into
mainfrom
southworks/add/expired-token-exception

Conversation

@ceciliaavila

Copy link
Copy Markdown
Collaborator

Fixes #4432

Description

This PR ports the changes in the PR#6572 to handle expired tokens and return a most accurate error message.

Specific Changes

  • Added catch block in jwtTokenExtractor for TokenExpiredErrors.
  • Added a unit test in jwtTokenExtractor.test.js to cover the new code.
  • Added a unit test in cloudAdapter.test.js to verify the exception is properly thrown.

Testing

These images show the exception being displayed to the user in Emulator and the new unit tests passing.
image

image

@ceciliaavila
ceciliaavila requested a review from a team as a code owner February 17, 2023 14:19
@coveralls

coveralls commented Feb 17, 2023

Copy link
Copy Markdown

Pull Request Test Coverage Report for Build 4204595324

  • 3 of 3 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.1%) to 84.763%

Totals Coverage Status
Change from base Build 4198805038: 0.1%
Covered Lines: 20034
Relevant Lines: 22407

💛 - Coveralls

@tracyboehrer
tracyboehrer merged commit 3fe6730 into main May 5, 2023
@tracyboehrer
tracyboehrer deleted the southworks/add/expired-token-exception branch May 5, 2023 13:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

port: [#6563] Expired JWT token exception not being handled (#6572)

3 participants