mirror of
https://github.com/proxmoxer/proxmoxer.git
synced 2026-04-24 22:56:01 +03:00
[GH-ISSUE #144] Could we always include resp.text in ResourceException.content? #72
Labels
No labels
backend:https
backend:local
backend:openssh
backend:ssh_paramiko
pull-request
status:ansible-issue
status:help-wanted
status:info-needed
status:proxmox-issue
status:review-needed
type:bug 🐞
type:dependency ⛓️
type:docs 📝
type:enhancement ⏫
type:maintenance 🛠️
type:meta
type:question ❓
type:request ✋
type:testing 🧪
version:1.x
version:latest
version:py2
version:py3
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/proxmoxer#72
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?
Originally created by @tiago8 on GitHub (Sep 2, 2023).
Original GitHub issue: https://github.com/proxmoxer/proxmoxer/issues/144
Originally assigned to: @jhollowe on GitHub.
As the title says, would it be possible to always include
resp.textinResourceException.content? Specifically, when hasattr(resp, "reason") is true, theresp.textis not included in the exception which may omit valuable information.Why?
I was setting up an Ansible playbook to automate the creation of a LXC container but kept running into the error:
After some debugging I found the issue (invalid rootfs param). It turned out that the API was returning the detailed cause inside
resp.textbut that wasn't being included in the exception.As such, always including
resp.textinResourceException.contentcan provide valuable information for quickly figuring out what is going wrong.Proposed how
A simple solution would be to replace proxmoxer/core.py#L152 with
resp.reason + " Specifically: " + resp.text,