ExceptionHandler for send requests and proxy responses in `HttpProxy`/`ReverseProxy`
@tsegismont ci sta già lavorando.
Dal 25/3/2025.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
Describe the feature
In case any interceptor fails with an exception, it is handled as a 502.
We propose to introduce an exceptionHandler in the HttpProxy to customize this behavior, analogously it is done in the HttpServerRequest, HttpServerResponse and many others.
Relevant code:
proxy.sendRequest()
.recover(throwable -> {
log.trace("Error in sending the request", throwable);
return Future.succeededFuture(proxyRequest.release().response().setStatusCode(502));
})
.compose(proxy::sendProxyResponse)
.recover(throwable -> {
log.trace("Error in sending the response", throwable);
return proxy.response().release().setStatusCode(502).send();
});
Use cases
When applying interceptors, the proxy may want to return status codes that differ to the hard-coded 502.
Contribution
I volunteer to implement this feature.
We propose to add the following methods to HttpProxy and ReverseProxy:
HttpProxy requestExceptionHandler(Handler<Throwable> handler);
HttpProxy responseExceptionHandler(Handler<Throwable> handler);
Alternatively, only exceptionHandler may be added that is to be used on both request and responses.
- Lingua principale
- Java
- Stelle
- 68
- Fork
- 39
- Merge medio
- 2g 43m
- PR unite (30g)
- 5
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di eclipse-vertx/vertx-http-proxy
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
Testing of different HTTP versionsForse già presa @tsegismont l’ha presa 2 giorni fa. Aperta
eclipse-vertx/vertx-http-proxy#165 · 1 assegnatario ·
-
enhancement
Difficoltà 4/5 3-5 giorni Idoneità per principianti 56/100
-
bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
-
enhancement
Difficoltà 4/5 3-5 giorni Idoneità per principianti 30/100
eclipse-vertx/vertx-http-proxy#109 · 5 commenti ·
Tutte le issue di eclipse-vertx/vertx-http-proxy
Issue simili
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
adorsys/keycloak-config-cli#1709 ·
I maintainer di solito rispondono entro 1 giorno
-
! and-bugs
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
osmandapp/OsmAnd#26769 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
NationalSecurityAgency/ghidra#9997 · 2 commenti ·
I maintainer di solito rispondono entro 2 giorni
-
[Bug] DefaultSerializationExceptionWrapper does not implement Cleanable, so cleanup() is never invoked by codecsForse già presa @binbin0325 l’ha presa oggi. Apertacomponent/need-triage type/need-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno
-
fix: tagged PDF fails with ClassCastException when a Form and its Image share an XObject nameForse già presa @hnc-jglee l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
opendataloader-project/opendataloader-pdf#830 ·
I maintainer di solito rispondono entro 1 giorno