• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

EcrituresNumeriques / stylo / 15922807606

27 Jun 2025 09:18AM UTC coverage: 39.241% (+0.04%) from 39.201%
15922807606

push

github

web-flow
Crée des requêtes de prévisualisation d'articles/corpus (#1592)

Co-authored-by: Thomas Parisot <thom4parisot@users.noreply.github.com>
Co-authored-by: Guillaume Grossetie <ggrossetie@yuzutech.fr>

570 of 800 branches covered (71.25%)

Branch coverage included in aggregate %.

90 of 250 new or added lines in 17 files covered. (36.0%)

137 existing lines in 8 files now uncovered.

5638 of 15020 relevant lines covered (37.54%)

2.66 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/front/src/components/errors/AppError.jsx
NEW
1
import { captureException } from '@sentry/react'
×
2

NEW
3
import React, { useEffect } from 'react'
×
NEW
4
import { Trans, useTranslation } from 'react-i18next'
×
NEW
5
import { isRouteErrorResponse, useRouteError } from 'react-router'
×
6

NEW
7
import Loading from '../molecules/Loading.jsx'
×
NEW
8
import Unauthorized from './401.jsx'
×
9

NEW
10
import styles from './AppError.module.scss'
×
11

NEW
12
export default function AppError() {
×
NEW
13
  const error = useRouteError()
×
14

NEW
15
  useEffect(() => {
×
NEW
16
    captureException(error)
×
NEW
17
  }, [error])
×
18

NEW
19
  return (
×
NEW
20
    <section className={styles.container}>
×
NEW
21
      <article className={styles.error}>{getErrorContent(error)}</article>
×
NEW
22
    </section>
×
23
  )
NEW
24
}
×
25

NEW
26
function getErrorContent(error) {
×
27
  // REMIND: can't use `Suspense` inside an ErrorBoundary component
NEW
28
  const { t, _, ready } = useTranslation('errors', { useSuspense: false })
×
NEW
29
  if (!ready) {
×
NEW
30
    return <Loading />
×
NEW
31
  }
×
NEW
32
  if (error.status === 401) {
×
NEW
33
    return <Unauthorized />
×
NEW
34
  }
×
NEW
35
  if (isRouteErrorResponse(error) || error instanceof Error) {
×
NEW
36
    return (
×
NEW
37
      <>
×
NEW
38
        <h2>{t('title', { status: error.status })}</h2>
×
NEW
39
        <p>{error.message || t('unknown')}</p>
×
NEW
40
        {error.data && (
×
NEW
41
          <p>
×
NEW
42
            <Trans i18nKey="code" values={{ code: error.data }} t={t}>
×
NEW
43
              <strong>Code</strong> {error.data}
×
NEW
44
            </Trans>
×
NEW
45
          </p>
×
46
        )}
NEW
47
        {error.stack && (
×
NEW
48
          <details>
×
NEW
49
            <pre>
×
NEW
50
              <code>{error.stack}</code>
×
NEW
51
            </pre>
×
NEW
52
          </details>
×
53
        )}
NEW
54
      </>
×
55
    )
NEW
56
  }
×
NEW
57
  return <h1>{t('unknown')}</h1>
×
NEW
58
}
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc