From: Dominik Csapak <d.csapak@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [RFC PATCH http-server 0/2] improve error handling on api errors
Date: Wed, 8 Jan 2025 09:45:56 +0100 [thread overview]
Message-ID: <20250108084558.390324-1-d.csapak@proxmox.com> (raw)
these two patches improve the error handling for api errors:
* put the error in the body (so we can access them in the rust client)
* use the correct error code in some places (500 instead of 501)
the second patch is not 100% necessary now IMHO, but it is more correct,
than the status quo.
Both patches modify the api response so I send it as RFC since they're
possibly breaking API changes (not sure about how we'd interpret this
though, since it's not mentioned on [0]).
0: https://pve.proxmox.com/wiki/Proxmox_VE_API#API_Stability_&_Breakage
Dominik Csapak (2):
add error message into http body
use HTTP_INTERNAL_SERVER_ERROR were appropriate instead of '501'
src/PVE/APIServer/AnyEvent.pm | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
--
2.39.5
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
next reply other threads:[~2025-01-08 8:46 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-08 8:45 Dominik Csapak [this message]
2025-01-08 8:45 ` [pve-devel] [RFC PATCH http-server 1/2] add error message into http body Dominik Csapak
2025-01-15 16:08 ` Thomas Lamprecht
2025-01-16 7:31 ` Dominik Csapak
2025-01-27 12:44 ` Dominik Csapak
2025-01-28 14:24 ` Thomas Lamprecht
2025-01-28 14:46 ` Dominik Csapak
2025-01-29 17:51 ` Thomas Lamprecht
2025-01-08 8:45 ` [pve-devel] [RFC PATCH http-server 2/2] use HTTP_INTERNAL_SERVER_ERROR were appropriate instead of '501' Dominik Csapak
2025-01-15 16:19 ` Thomas Lamprecht
2025-01-16 7:36 ` Dominik Csapak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250108084558.390324-1-d.csapak@proxmox.com \
--to=d.csapak@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.