quarkusio / quarkus-workshops

Hosts Quarkus related workshops
https://quarkus.io/quarkus-workshops/super-heroes/
Apache License 2.0
177 stars 175 forks source link

Narration endpoint is missing a fallback, and shouldn't be there if the narration service isn't up #435

Open holly-cummins opened 10 months ago

holly-cummins commented 10 months ago

I'm seeing two problems with the narration button:

image

This is the backend error:

16:55:46 ERROR [io.qu.ve.ht.ru.QuarkusErrorHandler] (executor-thread-3) HTTP Request to /api/fights/narrate failed, error id: ae33f1c8-bd78-4bed-b6c4-5acb42b859fc-1: jakarta.ws.rs.ProcessingException: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: localhost/127.0.0.1:8086
        at org.jboss.resteasy.reactive.client.handlers.ClientSendRequestHandler$2.accept(ClientSendRequestHandler.java:199)
        at org.jboss.resteasy.reactive.client.handlers.ClientSendRequestHandler$2.accept(ClientSendRequestHandler.java:191)
        at io.smallrye.context.impl.wrappers.SlowContextualConsumer.accept(SlowContextualConsumer.java:21)
        at io.smallrye.mutiny.helpers.UniCallbackSubscriber.onFailure(UniCallbackSubscriber.java:62)
        at io.smallrye.mutiny.operators.uni.UniOperatorProcessor.onFailure(UniOperatorProcessor.java:55)
        at org.jboss.resteasy.reactive.client.AsyncResultUni.lambda$subscribe$1(AsyncResultUni.java:37)
holly-cummins commented 10 months ago

Thinking about it more, I think maybe we have a fallback in the narration service, but not in the fight service. That's reasonable, since we want to keep things simple - but it makes hiding the button more important.