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.

bypass for errors

See original GitHub issue

I’m using apicache to cache an expense request to an upstream server that sometimes times out. However when the upstream request does timeout, I want to return an error response and not cache it so that the next time I will retry the upstream operation again.

So it’s not clear how to say from my route handler post-apicache middleware, “don’t cache the request this time.” I’ve tried adding apicache.clear(req.url); in my handler when I return my error response but that doesn’t appear to work.

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
uncedriccommented, Sep 29, 2015

it would be great if we could have an option to save in cache only responses with status 200, or add a handler function on the start configuration

1reaction
kwhitleycommented, Nov 18, 2016

See docs and/or Wiki for statusCode caching bypasses. This has been added!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error Management - bypass certain errors - Alteryx Community
Solved: Hi all ! I have a template that runs a .exe that I made to convert pdfs in a folder into .csv....
Read more >
Bypass error and continue code - python - Stack Overflow
Show activity on this post. If you want to execute a code block in the case the error does not occur you can...
Read more >
How To Fix or Bypass Error 451: Unavailable Due to Legal ...
1. Use a VPN (Virtual Private Network) Using a virtual private network (VPN) can let you bypass the error 451 message by encrypting...
Read more >
Error-free and error-prone lesion bypass by human DNA ...
Lesion bypass is an important cellular response to unrepaired DNA damage during replication. Two modes of lesion bypass are known, error-free and error-prone...
Read more >
Here's how to bypass SSL errors on your browser
Here's how to bypass SSL errors on your browser ... not rely on you and will give SSL errors even if the certificate...
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