-
Notifications
You must be signed in to change notification settings - Fork 869
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nicer ApiErrorException::__toString() #1562
Conversation
* Change github workflow * Update Makefile * Update tests/Stripe/GeneratedExamplesTest.php * Update Makefile * Yaml sucks --------- Co-authored-by: pakrym-stripe <[email protected]>
I'm unsure if this change is why, but after upgrading from a version before this release, my Stripe exceptions are now seemingly being split by the new line character being added after including the entire stack trace. I think this is breaking my logger since it's no longer receiving the format it's expecting. This is more or less a shot in the dark, but does this at all make sense as a side-effect here or should I start looking into other solutions? |
This is what I've been getting now after upgrading along with the rest of the stack trace which I've cropped out. You can see that the error being thrown is from the It seems that at some point the way the exceptions are coerced into strings is including the entire stack trace and affecting the way DataDog is interpretting the error message. |
@adaviloper What version of |
@prathmesh-stripe We're on 7.61.0. Are there any keys that are of particular interest? I'm not able to post the entire file. |
I'm interested to know if there is any custom message formatting in the configuration file that I need to be aware of before I try to reproduce this error. |
@prathmesh-stripe Appreciate the information. I'll go ahead and create an issue! |
Fixes #1561
Changes ApiErrorException::__toString() to have more useful information (a stack trace). This should be a safe change:
__toString()
is for human consumption and not intended to be consumed programatically.Before this change:
After this change: