Could not create a session when 2 requests are made manually one after the other

Alexandre Gounin 0 Reputation points
2024-06-25T09:25:44.3466667+00:00

Hello,

I'm working in a application to execute simulation on a excel file.

To do this, i create a session on my excel file using the end point : 'drives/{folder-id}/items/{excel-file-id}/workbook/createSession'

Then i update my value in the excel file, and finally i read the result field i need.

When i made the first request, everything work fin. But when i tried to make a second request, i got an error :

{
  code: 'BadRequest',
  message: 'Désolé... Nous avons rencontré un problème.',
  innerError: {
    code: 'badRequestUncategorized',
    message: 'La demande est incorrecte ou mal formulée.',
    innerError: {
      code: 'BadRequest',
      message: 'Désolé... Nous avons rencontré un problème.'
    },
    date: '2024-06-25T09:03:42',
    'request-id': '33b510d2-80d9-4884-9f42-b281b706e9f5',
    'client-request-id': '33b510d2-80d9-4884-9f42-b281b706e9f5'
  }
}
ed

--

I'm using a nest JS project with 2 settings to made my request : 1- using the SDK, 2- using axios.

On both case i got the same error.

--

What i do not understand is that if i reached the API limitation i should get a 429 error, so it's mean than i did not reach this limitation? Then if my request was really a bad request i should get the error on every request i made, but here i only get it after one request get a correct response.

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
13,480 questions
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.