[GH-ISSUE #32] recent patch breaks post and put api calls #23

Closed
opened 2026-02-26 17:32:11 +03:00 by kerem · 0 comments
Owner

Originally created by @Erik-Horn on GitHub (Feb 13, 2025).
Original GitHub issue: https://github.com/Corsinvest/cv4pve-api-powershell/issues/32

Originally assigned to: @franklupo on GitHub.

What happened?

The commit 04f2f84 for issue #28 has a search/replace mistake which breaks much of the module, especially functions that would use a post or put api call.

In the patch, references such as:

$PSBoundParameters['Target']

were replaced with:

$PSBoundParameters.ContainsKey['Target']

but should have been

$PSBoundParameters.ContainsKey('Target')

This results in no parameters being passed to Invoke-PveRestApi

Module version 8.3.0 does not have this issue.

Expected behavior

see the what happened section

Relevant log output

Broken module version output:

StatusCode          : 400
ReasonPhrase        : Parameter verification failed.
IsSuccessStatusCode : False
RequestResource     : /nodes/redacted/qemu/105/clone
Parameters          : {}
Method              : Post
ResponseType        : json


Working version of module:

StatusCode          : 200
ReasonPhrase        :
IsSuccessStatusCode : True
RequestResource     : /nodes/REDACTED/qemu/105/clone
Parameters          : {[newid, 999]}
Method              : Post
ResponseType        : json

Proxmox VE Version

8.3.2

Version (bug)

8.3.1

Version (working)

8.3.0

On what operating system are you experiencing the issue?

Windows

Pull Request

  • I would like to do a Pull Request
Originally created by @Erik-Horn on GitHub (Feb 13, 2025). Original GitHub issue: https://github.com/Corsinvest/cv4pve-api-powershell/issues/32 Originally assigned to: @franklupo on GitHub. ### What happened? The commit [04f2f84](https://github.com/Corsinvest/cv4pve-api-powershell/commit/04f2f84b2660f679389f002e695170e2033419cf) for issue #28 has a search/replace mistake which breaks much of the module, especially functions that would use a post or put api call. In the patch, references such as: $PSBoundParameters['Target'] were replaced with: $PSBoundParameters.ContainsKey['Target'] but should have been $PSBoundParameters.ContainsKey('Target') This results in no parameters being passed to Invoke-PveRestApi Module version 8.3.0 does not have this issue. ### Expected behavior see the what happened section ### Relevant log output ```shell Broken module version output: StatusCode : 400 ReasonPhrase : Parameter verification failed. IsSuccessStatusCode : False RequestResource : /nodes/redacted/qemu/105/clone Parameters : {} Method : Post ResponseType : json Working version of module: StatusCode : 200 ReasonPhrase : IsSuccessStatusCode : True RequestResource : /nodes/REDACTED/qemu/105/clone Parameters : {[newid, 999]} Method : Post ResponseType : json ``` ### Proxmox VE Version 8.3.2 ### Version (bug) 8.3.1 ### Version (working) 8.3.0 ### On what operating system are you experiencing the issue? Windows ### Pull Request - [ ] I would like to do a Pull Request
kerem closed this issue 2026-02-26 17:32:11 +03:00
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/cv4pve-api-powershell#23
No description provided.