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: generic remediator error handling issue #1277

Merged

Conversation

shuowu-okta
Copy link
Contributor

@shuowu-okta shuowu-okta commented Aug 17, 2022

Issue:

The following error happens when idx.session.expired error happen. It's because generic remediator will always be available and it runs getNextStep fn even it's a terminal error.

message: "Cannot read properties of undefined (reading 'name')"
stack: "TypeError: Cannot read properties of undefined (reading 'name')
    at GenericRemediator.getName (http://localhost:3000/okta-sign-in.next.js:218334:31)
    at GenericRemediator.getNextStep (http://localhost:3000/okta-sign-in.next.js:219412:23)
    at getNextStep (http://localhost:3000/okta-sign-in.next.js:221990:29)
    at handleIdxError (http://localhost:3000/okta-sign-in.next.js:222013:32)
    at _loop$ (http://localhost:3000/okta-sign-in.next.js:217624:53)
    at tryCatch (http://localhost:3000/okta-sign-in.next.js:268845:17)
    at Generator.invoke [as _invoke] (http://localhost:3000/okta-sign-in.next.js:269065:22)
    at prototype.<computed> [as throw] (http://localhost:3000/okta-sign-in.next.js:268898:21)
    at tryCatch (http://localhost:3000/okta-sign-in.next.js:268845:17)
    at maybeInvokeDelegate (http://localhost:3000/okta-sign-in.next.js:269126:18)"

Fix:

Change back to original if...else... logic

@shuowu-okta shuowu-okta marked this pull request as ready for review August 18, 2022 16:15
@eng-prod-CI-bot-okta eng-prod-CI-bot-okta merged commit f0fd47e into 6.7 Aug 19, 2022
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.

4 participants