[pbs-devel] [PATCH proxmox 1/1] auth-api: include meta information required by extjs in api endpoints

Thomas Lamprecht t.lamprecht at proxmox.com
Tue Jul 22 22:21:24 CEST 2025


Am 16.07.25 um 10:17 schrieb Shannon Sterz:
> On Wed Jul 16, 2025 at 12:40 AM CEST, Thomas Lamprecht wrote:
>> Am 10.07.25 um 15:50 schrieb Shannon Sterz:
>>> otherwise extjs will assume the requests failed even though they were
>>> successful.
>>
>> Potentially dumb question, but is this then only returning that for the
>> extjs formatter or also for the json one?
> 
> sadly this impacts all formaters as this type of api handler returns a
> `Response` right away instead of a passing it through a formater like
> other handler types. the problem with the other handler types is, that
> they don't let you access the requests header values as easily.
> 
> the nicest way to resolve this would probably be to pass down the
> formater in `handle_api_request` [1] to endpoints that return an
> `ApiResponseFuture`. so that they can handle the formatting themselves
> (some api endpoints like those that download raw text files etc.
> probably won't need the formater).

It might be better to expose through the (RPC/REST) environment in the
mid term, could be useful for other stuff too. Or alternatively expose
a structured way to pass back a cookie if the methods signals support
in the schema.

But either way: we can go this route for now, while looking at this more
closely down the line, when it either causes problems (IMO unlikely) or
when we need something similar for another reason anyway and can clean
this up here then too.

Anyway, if you get someone to give this a spin and at least a T-b here,
ideally a review too, I'd be still open to take this in.




More information about the pbs-devel mailing list