Graph error : <Message id > has to be unique in a batch

Đang mở
#1,679 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
node.js, typescript
Lĩnh vực
api

Hướng nghiên cứu

Start with the batch request handling in the @microsoft/microsoft-graph-client package and reproduce the POST to Graph’s $batch endpoint using the two message IDs from the report. Trace where the duplicate-ID error is produced and add a regression test for distinct IDs that differ only by case. Done means the batch request is accepted without the uniqueness error.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Bug - P1 TODO TypeScript

Bug Report

Prerequisites

  • Can you reproduce the problem?
  • Are you running the latest version?
  • Are you reporting to the correct repository?
  • Did you perform a cursory search?

For more information, see the CONTRIBUTING guide.

Description

Batch api/@microsoft/microsoft-graph-client throws an error even when you have 2 different strings

In my outlook inbox there were 2 different emails with message ids: AQMkADI1NjdjOTA3LTA2MDctNDljNS1iM2JjLWI0YzFmOGVjYjEzMABGAAADaFuLVZilDkGMRMEras84mwcAJoSf1ZrISEGDUfN0NvJ3fgAAAgEMAAAAJoSf1ZrISEGDUfN0NvJ3fgACvV-2EAAAAA== & AQMkADI1NjdjOTA3LTA2MDctNDljNS1iM2JjLWI0YzFmOGVjYjEzMABGAAADaFuLVZilDkGMRMEras84mwcAJoSf1ZrISEGDUfN0NvJ3fgAAAgEMAAAAJoSf1ZrISEGDUfN0NvJ3fgACvV-2eAAAAA==

the only discernible difference between these 2 strings is the eAAA and EAAA but they are different nonetheless

Console Errors: [Is there any console error]
Batch err GraphError: Request Id AQMkADI1NjdjOTA3LTA2MDctNDljNS1iM2JjLWI0YzFmOGVjYjEzMABGAAADaFuLVZilDkGMRMEras84mwcAJoSf1ZrISEGDUfN0NvJ3fgAAAgEMAAAAJoSf1ZrISEGDUfN0NvJ3fgACvV-2EAAAAA== has to be unique in a batch.

Steps to Reproduce (roughly)

It seems like a message which is undeliverable sometimes produces a message id which is similar to the undelivered email

  1. Have an email in the inbox
  2. Reply to that email with imaginary recipients
  3. You should now receive an undelivered email message in the same email thread
  4. Extract the message ids on this thread
  5. Batch them into an array with a structure like so
[    {
       id: '<Msg_id1>',
       url: '/me/messages/<MSG id 1/$value',
       method: 'GET'
     },
     {
       id: '<Msg id 2>',
       url: '/me/messages/<MSG id 2/$value',
       method: 'GET'
     }
]

  1. Pass this as a POST request to graph's $batch endpoint via the @microsoft/microsoft-graph-client npm library
    Expected behavior: The batch request should be executed

Actual behavior: Library throws a message id should be unique error

Additional Context

Add any other context about the problem here..

Usage Information

Request ID - 9ecfb982-93c9-4f64-9d2e-331ffdefd6fe

SDK Version - 3.0.7

  • [x ] Node (Check, if using Node version of SDK)

Node Version - [The version of Node you are using]

  • Browser (Check, if using Browser version of SDK)

Browser Name - [The name of Browser that you are using for SDK]

Version - [The version of the browser you are using]

Ngôn ngữ chính
TypeScript
Star
833
Fork
240
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của microsoftgraph/msgraph-sdk-javascript

Tất cả issue của microsoftgraph/msgraph-sdk-javascript

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.