[pve-devel] applied: [PATCH http-server] fix #6503: return api handler errors in the json body

Thomas Lamprecht t.lamprecht at proxmox.com
Tue Jan 28 15:26:25 CET 2025


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 at 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!




More information about the pve-devel mailing list