<commit_before>import React from 'react'
import {connect} from 'react-redux'

import {resetApiError} from './actions'

class ErrorsPage extends React.Component {

  resetApiError() {
    this.props.dispatch(resetApiError());
  }

  render() {
    if (this.props.error == null) {
      return null;
    }
    return(
      <div className="error-notify">
        <div className="error-icon">
          <i className="fa fa-times-circle" aria-hidden="true"></i>
        </div>
        <div className="error-message">
          <p>Birdseye has trouble connecting to the API.</p>
          <p>If this problem persist, we suggest you try again later.</p>
        </div><commit_msg>only show error message if its a 5xx error<commit_after>import React from 'react'
import {connect} from 'react-redux'

import {resetApiError} from './actions'

class ErrorsPage extends React.Component {

  resetApiError() {
    this.props.dispatch(resetApiError());
  }

  render() {
    if (!this.props.error || this.props.error.response.status < 500) {
      return null;
    }
    return(
      <div className="error-notify">
        <div className="error-icon">
          <i className="fa fa-times-circle" aria-hidden="true"></i>
        </div>
        <div className="error-message">
          <p>
            Birdseye has trouble connecting to the API
            {this.props.error.response &&
              " (got HTTP " + this.props.error.response.status + ")"}
            .
          </p>
          <p>If this problem persist, we suggest you try again later.</p>
        </div>
{'fraction_non_alphanumeric': 0.13516976297245356, 'fraction_numerical': 0.0025624599615631004, 'mean_word_length': 2.4179431072210065, 'pattern_counts': {'":': 0, '<': 26, '<?xml version=': 0, '>': 25, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6866792', 'n_tokens_mistral': 465, 'n_tokens_neox': 454, 'n_words': 122}