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.

Include Request in LensFailure

See original GitHub issue

I am using the failResponseFn for CatchLensFailure to log lens failures and redirect to a page with a custom error message.

I would like to be able to include more details in my logs about the request that failed, such as the URL and its query parameters. However, LensFailure does not seem to have the Request object that triggered the failure, and I don’t see anything else in LensFailure that would contain that sort of information.

It would be cool if you could consider tucking the Request into the LensFailure or otherwise supplying it to the failResponseFn.

Thanks for considering this!

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
commonsguycommented, Feb 25, 2019

It works! Many thanks!

1reaction
daviddentoncommented, Feb 22, 2019

will be released in 3.114.0

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to get more specific LensFailure messages? #116 - GitHub
Situation: I get a HTTP/1.1 400 body 'body' must be object response with an empty body after sending a JSON string to an...
Read more >
http4k How-to: Typesafe your API with lenses
Example showing how to create and apply lenses to requests and responses to both extract and inject typesafe values out of and into...
Read more >
Server as a function with Kotlin - http4k
First http4k server example · HttpHandler ( (Request) -> Response ): abstraction to process HTTP requests into responses by mapping the first ...
Read more >
Quickstart — Requests 2.28.1 documentation
Quickstart¶. Eager to get started? This page gives a good introduction in how to get started with Requests. First, make sure that: Requests...
Read more >
JC Penny (Optical - (US Vision)) Review: lens failure - delamination ...
I have a pair of glasses that I bought from the optical shop at the Citadel Mall ... I called US Vision directly...
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