ODataError::__toString() does not provide useful informations
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 55/100
Research direction
Start at the ODataError exception and its getError entry point, then reproduce the logged __toString() output described in the issue. Done means the serialization includes the MainError's code, message, and details in addition to the existing exception information.
Written by the indexing model from the issue text.
Description
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_
- Dominant language
- PHP
- Stars
- 13
- Forks
- 8
- Avg merge
- 14h 58m
- Merged PRs (30d)
- 3
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoftgraph/msgraph-beta-sdk-php
-
dependency:metadata ToTriage type:bug
Difficulty 4/5 3-5 days Newbie friendliness 38/100
microsoftgraph/msgraph-beta-sdk-php#356 · 1 comment ·
-
status:waiting-for-triage ToTriage type:bug
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
dependency:metadata ToTriage type:bug
Difficulty 2/5 1-3 hours Newbie friendliness 48/100
microsoftgraph/msgraph-beta-sdk-php#321 · 1 comment ·
All issues in microsoftgraph/msgraph-beta-sdk-php
Similar issues
-
priority: p3
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
googleapis/librarian#7636 ·
-
0. Needs triage bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
nextcloud/fulltextsearch#1011 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
phpstan/phpstan-doctrine#794 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Automattic/static-site-importer#1767 ·