From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>,
Dominik Csapak <d.csapak@proxmox.com>
Subject: [pve-devel] applied: [PATCH http-server] fix #6503: return api handler errors in the json body
Date: Tue, 28 Jan 2025 15:26:25 +0100 [thread overview]
Message-ID: <e21ae156-bbc1-4ce5-828d-bc5d5f210fa8@proxmox.com> (raw)
In-Reply-To: <20250108095853.896087-1-d.csapak@proxmox.com>
Am 08.01.25 um 10:58 schrieb Dominik Csapak:
> similar to what we do for the extjs formatter, put the error message or
> status message in the 'message' property of the return object.
>
> This way client libraries can extract the error without having to parse
> the HTTP status reason phrase (which is not possible in all http
> libraries, e.g. hyperium's http rust crate).
>
> This should not be a breaking change, since it just adds a (semi) new
> field to the return value.
>
> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
> ---
> we could of course put the error also in the 'errors' hash with a
> special key like '_api', but i opted for mirroring the 'extjs' formatter
> behaviour for consistency.
>
> src/PVE/APIServer/Formatter/Standard.pm | 4 ++++
> 1 file changed, 4 insertions(+)
>
>
applied, thanks!
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
prev parent reply other threads:[~2025-01-28 14:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-08 9:58 [pve-devel] [PATCH http-server] fix #6503: return api handler errors in the json body Dominik Csapak
2025-01-28 14:26 ` Thomas Lamprecht [this message]
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=e21ae156-bbc1-4ce5-828d-bc5d5f210fa8@proxmox.com \
--to=t.lamprecht@proxmox.com \
--cc=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox