Skip to content

Commit

Permalink
fix(usebruno#1920): Ignore redirect abortion emmited by loadUrl (useb…
Browse files Browse the repository at this point in the history
  • Loading branch information
gustavokath authored and slowjoe007 committed Apr 10, 2024
1 parent 2dce660 commit 2915120
Showing 1 changed file with 5 additions and 0 deletions.
Expand Up @@ -75,6 +75,11 @@ const authorizeUserInWindow = ({ authorizeUrl, callbackUrl, session }) => {
try {
await window.loadURL(authorizeUrl);
} catch (error) {
// If browser redirects before load finished, loadURL throws an error with code ERR_ABORTED. This should be ignored.
if (error.code === 'ERR_ABORTED') {
console.debug('Ignoring ERR_ABORTED during authorizeUserInWindow');
return;
}
reject(error);
window.close();
}
Expand Down

0 comments on commit 2915120

Please sign in to comment.