mirror of
https://github.com/Telmate/proxmox-api-go.git
synced 2026-04-25 23:45:55 +03:00
[PR #242] [MERGED] client: handle nil response/body on task errors #335
Labels
No labels
good first issue
issue/confirmed
issue/critical
proposal/accepted
pull-request
type/bug
type/enhancement
type/feature
type/question
type/refactoring
type/testing
type/testing
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/proxmox-api-go#335
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Telmate/proxmox-api-go/pull/242
Author: @lbajolet-hashicorp
Created: 3/8/2023
Status: ✅ Merged
Merged: 3/18/2023
Merged by: @mleone87
Base:
master← Head:handle_task_error_panic_fix📝 Commits (1)
6fe7346client: handle nil response/body on task errors📊 Changes
1 file changed (+6 additions, -0 deletions)
View changed files
📝
proxmox/client.go(+6 -0)📄 Description
As with
CreateQemuVm, sometimes theHandleTaskErrorfunction panics on a nil deferencement error when the reponse or the body is nil.To avoid this, we only read/close the body when it is available, and fallback to a generic error string otherwise.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.