Skip to main content

All Questions

-4 votes
1 answer
2k views

Handling errors for different response status in React?

I am developing a fullstack app with Spring Boot and React and there are different status codes and bodies for the following situations: when credentials are wrong: 500 { "status": 500, ...
Jack's user avatar
  • 1
2 votes
3 answers
4k views

Unable to handle net::ERR_CONNECTION_REFUSED in React

I am trying a post request to http://localhost:5000/run. If the server is not running then trying to throw "Please retry again" to client. try{ const {data} = await axios.post("http:...
Khagen Borah's user avatar
1 vote
2 answers
233 views

could not find react-redux context value error triggering randomly

Here is my code for displaying the contents of my Redux store state in JSON: function ShowCartContents() { // Convert object to JSON before rendering const cartContentsJSON = JSON....
Mr. Engineer's user avatar
0 votes
1 answer
376 views

React.js - Handle exception caused by import in App.js

I just added an import line to my App.js code that caused an exception which I can see in the dev tools console: Uncaught SyntaxError: expected expression, got '!' I've read this page which explains ...
Dudeman3000's user avatar
0 votes
1 answer
1k views

How to handle native exception in react-native

I want to handle native exception in react-native application. I'm currently using the react-native-exception-handler module to do this. All things are working fine except callback. If you read about ...
Shubham's user avatar
  • 738
1 vote
1 answer
4k views

Is there a way to globally catch unhandled promise exceptions in reactjs?

I tried using the componentDidCatch, but it looks like that hook is only for actual errors in rendering components. Promises can happen in one of the component hierarchies but don't actually get ...
user6728767's user avatar
  • 1,253
0 votes
0 answers
171 views

Rails 5 - Why we will get DOMException error in ReactJS?

In rails 5, I am using "react": "^15.4.1" for front-end. I am getting an error like Uncaught DOMException: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this ...
Shruthi R's user avatar
  • 1,923
6 votes
1 answer
3k views

How to handle exceptions thrown in react-router child routes

I'm having an issue with exception handling with [email protected] My router is attached like this: try { ReactDOM.render(<Router history={appHistory}> <Route path='/' component={...
Charlie's user avatar
  • 81
12 votes
3 answers
20k views

Capturing React Errors Globally

I'm new to React. I want to capture all react uncaught and unexpected errors/warnings and i would like to log the errors to an external api. I know its possible by Try Catch method but I'm planning ...
Jeev's user avatar
  • 141
4 votes
2 answers
402 views

How to use Redux time travel to handle errors

I'm trying to figure out how to handle errors in React/Redux application and figured out that Redux allows to traverse the state continuum backwards due the immutable state pattern. Is it crazy idea ...
Tuomas Toivonen's user avatar
1 vote
1 answer
756 views

How to handle server/connection exceptions with React and Redux thunk in a maintainable manner

I'm using Redux thunk to dispatch asynchronous actions like fetching and posting to server. Each action creator call returns a promise, which resolves when after ajax has done it's magic and Redux has ...
Tuomas Toivonen's user avatar