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

Factor out and wrap environment variable access in a try/catch #1413

Merged
merged 2 commits into from
May 26, 2023

Conversation

jacoblee93
Copy link
Collaborator

Some Deno configurations will throw an error if any attempt is made to access an environment variable. This PR refactors process.env access into a util method. Should also remove the need to have TS compiler ignore comments in many places as well.

Fixes #1412

@vercel
Copy link

vercel bot commented May 25, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
langchainjs-docs ✅ Ready (Inspect) Visit Preview May 26, 2023 4:48pm

@stevekrouse
Copy link

Thank you!!

@WadeWarren
Copy link

@nfcampos This would be great to merge so we can use langchainjs with Deno / edge functions. :-)

@jacoblee93 jacoblee93 self-assigned this May 26, 2023
@jacoblee93 jacoblee93 added the lgtm PRs that are ready to be merged as-is label May 26, 2023
@jacoblee93
Copy link
Collaborator Author

Will go out in today's release!

@jacoblee93 jacoblee93 merged commit 7e28758 into langchain-ai:main May 26, 2023
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm PRs that are ready to be merged as-is
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fail gracefully if Deno.env is not accessible
3 participants