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.

is it possible to catch all request errors ?

See original GitHub issue

Hello,

Is there a way to catch all requests errors for example with redux saga ? Other than using error(action.toString()) for all request actions ?

My use case is to watch for auth token expiration error for all request.

I use axios drive so maybe I could do it in its config directly, but I’d prefer using saga, so I can dispatch some action when it happens

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
sylvainbaronnetcommented, Jan 12, 2021

It’s good I can close it, thanks again.

I’ll try to check potential changes when I have time

0reactions
klis87commented, Jan 11, 2021

Glad that it is helpful! Can we close it then? If not, don’t hesitate to ask further questions. Actually you touched important topic about interceptors, see https://github.com/klis87/redux-requests/issues/397 if you are interested about potential interceptor changes

Read more comments on GitHub >

github_iconTop Results From Across the Web

Correct way to try/except using Python requests module?
You can either catch the base-class exception, which will handle all cases: try: r = requests.get(url, params={'s': thing}) except ...
Read more >
How To Handle Errors & Exceptions with Requests and Python
Learning how to raise and handle your exceptions properly in Python is an extremely useful skill especially when paired with good logging.
Read more >
Error handling, "try...catch" - The Modern JavaScript Tutorial
So, try...catch can only handle errors that occur in valid code. Such errors are called “runtime errors” or, sometimes, “exceptions”.
Read more >
How to Catch All Exceptions in C# & Find All Application Errors
Find all application errors. Catch all exceptions in your application with a C# global exception handler and other exception handling ...
Read more >
requests.exceptions — Requests 2.28.1 documentation
Catching this error will catch both :exc:`~requests.exceptions.ConnectTimeout` and :exc:`~requests.exceptions.ReadTimeout` errors. """ [docs] ...
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