Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unhandled exception in router #2675

Open
IBPrivate opened this issue Nov 4, 2024 · 3 comments
Open

Unhandled exception in router #2675

IBPrivate opened this issue Nov 4, 2024 · 3 comments
Labels

Comments

@IBPrivate
Copy link

IBPrivate commented Nov 4, 2024

I do get more errors in the last time about "Unhandled exception in router".

I added logging:

router.route().failureHandler(routingContext -> {
    Throwable failure = routingContext.failure();
    if (failure != null) {
        failure.printStackTrace();
    } else {
        Server.log("A failue without throwable has occured:");
        Server.log("RequestURL: " + routingContext.request().absoluteURI());
        Server.log("Requested URL: " + routingContext.request().path());
        Server.log("HTTP-Method: " + routingContext.request().method());
        Server.log("Header: " + routingContext.request().headers());
        Server.log("Body: " + routingContext.body().asString());
        if (routingContext.request().authority() != null) {
            WebSK.log("Host: " +  routingContext.request().authority().host());
        }
    }
    routingContext.response().setStatusCode(404).end();
});

A failue without throwable has occured:
RequestURL: http://example.com:443example.com:443
Requested URL: example.com:443
HTTP-Method: CONNECT
Header: Host=example.com:443
User-Agent=Go-http-client/1.1
Body: null
Host: http://example.com

Any ideas how to supress them (or correct this issue, its kind of annoying)...

@IBPrivate IBPrivate added the bug label Nov 4, 2024
@IBPrivate
Copy link
Author

And why is routingContext.request().absoluteURI() doubled: "http://example.com:443example.com:443/"?
Shouldn't that be "http://example.com:443"?

@tsegismont tsegismont added question and removed bug labels Nov 5, 2024
@tsegismont
Copy link
Contributor

Perhaps it is the client that is not working well? Can you enable traffic logging or capture it with Wireshark?

@IBPrivate
Copy link
Author

I cant reproduce that - I dont make the requests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants