Repository navigation
fix: log a Proxmox error once, with one stack trace - #176
Merged
Merged
Conversation
ProxmoxConnectionException's message was the RequestException's message plus its getTraceAsString(), and the RequestException was chained as the previous exception. A logged Proxmox error therefore printed the trace three times -- in the message, for the exception, and for the previous one, thrown from the same line -- about 256 lines per error. A page polling a server whose VM is gone wrote one of those every few seconds. The message is now "Proxmox returned <status>: <Proxmox's error>", taken from the response's JSON message, then its reason phrase, then the HTTP client's message. Nothing is chained; the response is kept on the exception as a public readonly property for callers that need it. A real error from a node now logs as one 32-line entry with a single trace. The ISO link check, which looks for Proxmox's "Can't connect to" in the message, still finds it: that text is Proxmox's error, not the trace.
ericwang401
added a commit
that referenced
this pull request
Oct 16, 2026
isVmMissingError() read the response off the RequestException that ProxmoxConnectionException wrapped. #176 stops wrapping it and keeps the response on the exception instead, so read $e->response first and fall back to the wrapped one. The "does not exist" check then works whichever of the two PRs merges first; #172's tests pass against both versions of the exception.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Every error from Proxmox logged its stack trace three times, about 256 lines per error. A page polling a server whose VM was gone wrote one of those every few seconds.
Cause
ProxmoxConnectionExceptionbuilt its message from theRequestException's message plusgetTraceAsString(), and chained thatRequestExceptionas the previous exception. Laravel then printed the trace inside the message, again for the exception, and again for the previous one. All three were thrown from the same line.Changes
Proxmox returned <status>: <Proxmox's error>. The error comes from the response's JSONmessage, then the reason phrase, then the HTTP client's message.public readonly Response $responsefor callers that need Proxmox's answer.Testing
Notes
$e->responsetoo, so the two PRs work in either merge order.