I am trying to connect to Azure Cosmos DB using the mongoose module in Node.js.
Try mongoose.connect by declaring the URI in the env configuration file (nodemon.json to be exact).
======== app.js ========
...
mongoose.connect(process.env.MONGODB_URI, options
);
=====================
At this time, the following error occurs.
I would like to use the mongoose module whenever possible.
How to solve the MAC signature problem?
========= error =========
MongoServerError: Error=2, Details='Response status code does not indicate success: BadRequest (400); Substatus: 1028;
ActivityId: 1609699a-f661-4884-aa15-eab65d52ce56; Reason: (Message: {"Errors":["The MAC
signature found in the HTTP request is not the same as the computed signature.
Server used following string to sign - 'post\ncolls\n\nthu, 22 dec 2022 05:42:50 gmt\n\n'.
Learn more: https://aka.ms/cosmosdb-tsg-mac-signature","Your account is currently configured with a total throughput limit of 1000 RU/s.
This operation failed because it would have increased the total throughput to 1400 RU/s. See https://aka.ms/cosmos-tp-limit for more information."]}
ActivityId: 1609699a-f661-4884-aa15-eab65d52ce56,
Request URI: /apps/8f912fc7-f1c2-460e-9795-2a1371811e40/services/f6923d3f-97d3-4380-9ad4-1fe34a73d9c3/partitions/e6b83650-e035-4d5f-a5f2-7040dad4c83f/replicas/133085019068788391p,
RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, Microsoft.Azure.Cosmos.Tracing.TraceData.ClientSideRequestStatisticsTraceDatum,
Windows/10.0.17763 cosmos-netstandard-sdk/3.18.0);
====================
Thanks in advance for your attention and answers.