LohitG opened a new pull request, #40490:
URL: https://github.com/apache/superset/pull/40490

   ### SUMMARY
   
   `getGuestTokenRefreshTiming` currently decodes the guest token before 
applying its fallback timing logic. If the token string itself is malformed or 
undecodable, `jwtDecode` can throw before the fallback path runs.
   
   This wraps the decode and expiration parsing logic in a `try/catch`, so 
malformed guest tokens fall back to the existing default refresh timing instead 
of throwing.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   N/A - no UI changes.
   
   ### TESTING INSTRUCTIONS
   
   ```bash
   cd superset-embedded-sdk
   npm test
   ```
   
   Result:
   
   ```text
   Test Suites: 1 passed, 1 total
   Tests:       8 passed, 8 total
   ```
   
   ### ADDITIONAL INFORMATION
   
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to