ODataError::__toString() does not provide useful informations

Đang mở
#309 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ó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
55/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
php
Lĩnh vực
api

Hướng nghiên cứu

Bắt đầu từ exception ODataError và entry point getError của nó, sau đó tái tạo output __toString() được ghi log như mô tả trong issue. Hoàn tất khi quá trình serialization bao gồm code, message và details của MainError bên cạnh thông tin exception hiện có.

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

Mô tả

ToTriage type:enhancement
Describe the bug

When an error occurs, it is correctly parsed into a ODataError, which results in an Exception being thrown.
But when i try to get infos, for example by logging, no useful infos appear.
This is because ODataError infos are contained inside its error property which isn't printed.

Expected behavior

Overwrite __toString method in ODataError so that MainError obtained with getError is part of the serialization.
It contains error code, message and details

How to reproduce

try {
// Make some silly call to api to trigger an error

} catch (ODataError $e) {
var_dump($e->__toString()); // Only includes trace, no error code, message or details
}

SDK Version

No response

Latest version known to work for scenario above?

No response

Known Workarounds

No response

Debug output
Click to expand log ```
</details>


### Configuration

_No response_

### Other information

_No response_
Ngôn ngữ chính
PHP
Star
13
Fork
8
Merge trung bình
14 giờ 58 phút
Pull request đã merge (30 ngày)
3

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-beta-sdk-php

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

Issue tương tự

Thêm issue về PHP

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.