mirror of
https://github.com/floci-io/floci.git
synced 2026-11-24 06:20:24 -05:00
fix(ui): register StatusResponse for native-image reflection (#1441)
The /_floci/ui/status endpoint returned HTTP 500 under the native image
because Jackson could not serialize UiController.StatusResponse (no
reflection metadata was registered). The interstitial page served by
GET /_floci/ui polls /status and only redirects to the floci-ui sidecar
once it reads {ready:true,url:...}, so a 500 there left the UI stuck on
the loading page even though the floci-ui container was up and healthy.
Register the record for reflection, matching the existing pattern used
by other controller response types (e.g. AwsErrorResponse).
This commit is contained in:
1 parent
3860fafdfb
commit
aaa1faa7fe
1 file changed
+2
@@ -3,6 +3,7 @@ package io.github.hectorvent.floci.lifecycle;
|
||||
import io.github.hectorvent.floci.services.floci.ui.FlociUiManager;
|
||||
import io.github.hectorvent.floci.services.floci.ui.FlociUiManager.UiStatus;
|
||||
import io.github.hectorvent.floci.services.floci.ui.UiPages;
|
||||
import io.quarkus.runtime.annotations.RegisterForReflection;
|
||||
import jakarta.inject.Inject;
|
||||
import jakarta.ws.rs.GET;
|
||||
import jakarta.ws.rs.HeaderParam;
|
||||
@@ -40,6 +41,7 @@ public class UiController {
|
||||
return Response.ok(uiPages.startingHtml()).build();
|
||||
}
|
||||
|
||||
@RegisterForReflection
|
||||
public record StatusResponse(boolean ready, String url, String error) {}
|
||||
|
||||
@GET
|
||||
|
||||
Reference in new issue
Block a user