Capturing Errors in React Component