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

CompleteOAuth2 does not catch license type error #1080

Open
am-maneaters opened this issue Mar 1, 2023 · 0 comments
Open

CompleteOAuth2 does not catch license type error #1080

am-maneaters opened this issue Mar 1, 2023 · 0 comments

Comments

@am-maneaters
Copy link
Contributor

Describe the bug

When calling completeOAuth2, I cannot catch the error that occurs when a user does not have a sufficient user license. This makes it impossible for me to handle this error and I am not sure why the error is breaking out of the try catch

Reproduction

try {
    const res = ArcGISIdentityManager.completeOAuth2(JSON.parse(opts));
} catch {
    console.log('Error not being caught');
}

Logs

ArcGISIdentityManager.ts:472 Uncaught (in promise) 
ArcGISAuthError: invalid_request: You do not have a sufficient user license type to access this application.
    at win.addEventListener.once (ArcGISIdentityManager.ts:472:31)
    at reportError (chunk-MWYRUQLI.js:924:20)
    at ArcGISIdentityManager.completeOAuth2 (chunk-MWYRUQLI.js:975:14)
    at Authenticate.tsx:28:41

System Info

Binaries:
    Node: 18.13.0 - ~/.nvm/versions/node/v18.13.0/bin/node
    Yarn: 1.22.19 - ~/.nvm/versions/node/v18.13.0/bin/yarn
    npm: 8.19.3 - ~/.nvm/versions/node/v18.13.0/bin/npm
  Browsers:
    Chrome: 110.0.5481.177
    Firefox: 109.0.1
  npmPackages:
    @esri/arcgis-rest-request: ^4.1.1 => 4.1.1

Additional Information

No response

@am-maneaters am-maneaters changed the title CompleteOAuth2 does not catch CompleteOAuth2 does not catch license type error Mar 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants