You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
writeAdminJSON used to stream json.NewEncoder(w).Encode(...) directly
to the ResponseWriter. If marshalling failed midway through the body
(an unsupported type, a Marshaler returning an error), the 200 status
header was already on the wire and the client received a truncated /
malformed JSON object — unrecoverable on the SPA side.
Marshal to []byte first, *then* write the status + body. An encode
failure now upgrades to a clean 500 with the standard error envelope.
Write failures after the status is committed remain log-only.
Also documents the deliberate "materialise the full table list before
paginate-and-slice" choice in handleList so future readers know the
adapter's listTableNames already scans the entire metadata prefix in
one shot for the SigV4 path; streaming on top would not change the
adapter's memory profile.
0 commit comments