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

Use new URL Parser when handling Cosmos connection string #8

Merged
merged 1 commit into from
Sep 16, 2022
Merged

Use new URL Parser when handling Cosmos connection string #8

merged 1 commit into from
Sep 16, 2022

Conversation

khowling
Copy link
Contributor

When deploying this example using a Comsos for Mongo API connection, I was receiving the error below, this fixes it:

Exception: Error: Password contains an illegal unescaped character
Stack: Error: Password contains an illegal unescaped character
    at parseConnectionString (/home/site/wwwroot/node_modules/mongodb/lib/url_parser.js:305:13)
    at parseHandler (/home/site/wwwroot/node_modules/mongodb/lib/url_parser.js:136:14)
    at module.exports (/home/site/wwwroot/node_modules/mongodb/lib/url_parser.js:28:12)
    at deprecated (internal/util.js:89:15)
    at connect (/home/site/wwwroot/node_modules/mongodb/lib/operations/connect.js:282:3)
    at /home/site/wwwroot/node_modules/mongodb/lib/mongo_client.js:260:5
    at maybePromise (/home/site/wwwroot/node_modules/mongodb/lib/utils.js:692:3)
    at MongoClient.connect (/home/site/wwwroot/node_modules/mongodb/lib/mongo_client.js:256:10)
    at /home/site/wwwroot/node_modules/mongoose/lib/connection.js:835:12
    at new Promise (<anonymous>)
    at NativeConnection.Connection.openUri (/home/site/wwwroot/node_modules/mongoose/lib/connection.js:832:19)
    at /home/site/wwwroot/node_modules/mongoose/lib/index.js:351:10
    at /home/site/wwwroot/node_modules/mongoose/lib/helpers/promiseOrCallback.js:32:5
    at new Promise (<anonymous>)
    at promiseOrCallback (/home/site/wwwroot/node_modules/mongoose/lib/helpers/promiseOrCallback.js:31:10)
    at Mongoose._promiseOrCallback (/home/site/wwwroot/node_modules/mongoose/lib/index.js:1149:10)

@khowling
Copy link
Contributor Author

khowling commented Sep 15, 2022

closes #9

@GeekTrainer GeekTrainer merged commit 2519393 into staticwebdev:main Sep 16, 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.

2 participants