question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Make it clearer that HttpResponse construction should generally not block

See original GitHub issue

This is just food for thought, can close if we’re happy already.

I find it’s too easy for users to shoot themselves in the foot since the difference in “semantic meaning” of an HttpResponse (something that streams) and AggregatedHttpResposne (something that’s collected) is very subtle.

https://github.com/jeqo/zipkin-storage-kafka/pull/38/commits/c5d6976fc0fcb18109bd1af445f83ffc02a7d96d

Just changing all references of HttpResponse to AggregatedHttpResponse compiles, but changes the behavior completely from not-work to work. This is very subtle.

Should we reconsider providing the helpers that return a HttpResponse based on collected payloads? Remove from(CompletableStage<HttpResponse>) in favor of from(CompletableStage<AggregatedHttpResponse>? Change the naming? Or maybe just do nothing 😃

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:10

github_iconTop GitHub Comments

1reaction
anuraagacommented, Sep 16, 2019

I guess so 😃 But we might consider adding a version that logs warnings that users need to add the annotation before changing - if it were just a class load exception or something it’s still easy to debug if you missed the release notes, but if it’s deadlocks people could get very confused.

0reactions
anuraagacommented, Sep 16, 2019

Thanks! I’ll close this one then.

Read more comments on GitHub >

github_iconTop Results From Across the Web

HTTP Messages - MDN Web Docs - Mozilla
HTTP messages are how data is exchanged between a server and a client. There are two types of messages: requests sent by the...
Read more >
Java static code analysis: Constructors should not be used to ...
Constructors for String , BigInteger , BigDecimal and the objects used to wrap primitives should never be used. Doing so is less clear...
Read more >
How to parse the response body in Java, when the HTTP ...
Try the following approach without needing a custom handler. The idea is to get the response as a string from the HttpStatusCodeException, and...
Read more >
3 Configuring HTTP Secure Headers - Oracle Help Center
A browser detecting an XSS and blocking it does not mean that the application has an XSS vulnerability. In some cases, this header...
Read more >
Exception Handling • Akka HTTP - Documentation
At the root of the route tree any still unhandled exception will be dealt ... could not be handled normally") complete(HttpResponse(InternalServerError, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found