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

Guard authenticate_google_api's calls to OAuth #418

Open
applmak opened this issue Sep 11, 2023 · 0 comments
Open

Guard authenticate_google_api's calls to OAuth #418

applmak opened this issue Sep 11, 2023 · 0 comments
Assignees

Comments

@applmak
Copy link
Contributor

applmak commented Sep 11, 2023

Hi. I saw an error like this which stopped the execution of the wall server:

error: Uncaught TypeError: error sending request for url (https://oauth2.googleapis.com/token): error trying to connect: dns error: failed to lookup address information: Name or service not known
    const res = await fetch("https://oauth2.googleapis.com/token", {
                ^
    at async mainFetch (deno:ext/fetch/26_fetch.js:247:14)
    at async fetch (deno:ext/fetch/26_fetch.js:464:9)
    at async GoogleAuth.refreshToken (chicago-brick/server/util/authenticate_google_api.ts:73:17)
    at async GoogleAuth.getRequestHeaders (chicago-brick/server/util/authenticate_google_api.ts:29:7)
    at async driveFilesList (chicago-brick/demo_modules/slideshow/load_from_drive_server.ts:43:26)
    at async Object.start (chicago-brick/demo_modules/slideshow/load_from_drive_server.ts:84:28)

This should probably be guarded against via some kind of try/catch to at least prevent this kind of failure (also, maybe installing a top-level unhandled exception handler is a good approach, too)? I don't know why this would happen. Introducing some kind of retry-like functionality would be smart here, too, with an exponential backoff.

I suspect that this is causing regular issues with the wall.

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

No branches or pull requests

2 participants