I had an issue similar to https://learn.microsoft.com/en-us/answers/questions/504422/graph-return-exception-message-34invalid-start-off.html
when I was trying to add some file attachments on an email I had random errors 400 code : InvalidStart
My default behavior when I get an HTTP response NULL is to retry the last request.
The Graph response to the retry attempt is :
HTTP code 400 : {"error":{"code":"InvalidStart","message":"Invalid Start offset for the current fragment. Fragment might already have been uploaded."}}
What should be my application's behavior when I receive this error?
- How to detect if the upload request was successfull?
- Is it possible to get this error 400 if the last chunk was only partially uploaded?
- Can I consider this error as a success in some cases?
I remember for this type of scenarii the OneDrive API has a feature to ask the missing ranges.
https://learn.microsoft.com/en-us/graph/api/driveitem-createuploadsession?view=graph-rest-1.0#resuming-an-in-progress-upload
I could not find the same feature for the email attachment upload. Could you confirm that this feature is not available?
Is there no other way than to cancel and retry the upload with a new session?
like with OneDrive API : https://learn.microsoft.com/en-us/graph/api/driveitem-createuploadsession?view=graph-rest-1.0#cancel-the-upload-session
detail error 400 code : InvalidStart :
The first time I had three error :
request-id : 056c38d3-5037-c823-046e-17c57cc5e3af
Date : Mon, 03 Oct 2022 09:08:34 GMT
request-id : 6b1b9757-81e8-f2a4-836e-af6828e51e46
Date : Mon, 03 Oct 2022 09:09:20 GMT
request-id : c221fe3a-131d-daa3-a83b-77ed7876377c
Date : Mon, 03 Oct 2022 09:12:46 GMT
and two attachments files were missing
The second time I had two error :
request-id : 7920075b-1f02-9d49-72ee-2cb86b3a042e
Date : Mon, 03 Oct 2022 12:31:23 GMT
request-id : 9151bc31-d36b-f491-5941-8988b1f631b7
Date : Mon, 03 Oct 2022 12:32:19 GMT
(one attachment file were missing)