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

Freegle / iznik-nuxt3 / c116036c-55fb-4d4e-a732-06fbe0906fc1

13 Oct 2025 12:31PM UTC coverage: 34.681% (-11.0%) from 45.694%
c116036c-55fb-4d4e-a732-06fbe0906fc1

push

circleci

edwh
Migrate logo API call from v1 to v2

1053 of 3928 branches covered (26.81%)

Branch coverage included in aggregate %.

0 of 1 new or added line in 1 file covered. (0.0%)

723 existing lines in 55 files now uncovered.

2722 of 6957 relevant lines covered (39.13%)

38.05 hits per line

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

7.55
/plugins/something-went-wrong.client.js
1
import * as Sentry from '@sentry/browser'
2
import { APIError, MaintenanceError } from '@/api/BaseAPI'
3
import { useMiscStore } from '~/stores/misc'
4
import { useRouter } from '#imports'
5
import { suppressException } from '~/composables/useSuppressException'
6

7
export default defineNuxtPlugin((nuxtApp) => {
6✔
8
  const originalErrorHandler = nuxtApp.vueApp.config.errorHandler
21✔
9

10
  nuxtApp.vueApp.config.errorHandler = (err, vm, info, ...rest) => {
21✔
UNCOV
11
    console.log('Vue errorHandler', err.message)
×
UNCOV
12
    if (err instanceof MaintenanceError) {
×
13
      // This is thrown in response to API return codes from the server.
14
      throw err
×
UNCOV
15
    } else if (err instanceof APIError && vm && vm.$bvToast) {
×
16
      const { request, response } = err
×
17
      try {
×
18
        // We have seen Sentry issues which look as though our console.error log here is itself causing an exception,
19
        // on older devices which might be less good at using console on complex objects.
20
        //
21
        // So log more carefully.
22
        console.log('Vue errorHandler')
×
23
        console.log('Err', err)
×
24
        console.log('Request', request)
×
25
        console.error('Response', response)
×
26
      } catch (e) {
27
        console.error('Error in toast logging', e)
×
28
      }
29

30
      // Trigger popup.
31
      const miscStore = useMiscStore()
×
32
      miscStore.setErrorDetails(err)
×
33

34
      Sentry.captureMessage('API error')
×
35

36
      return true
×
UNCOV
37
    } else if (suppressException(err)) {
×
38
      return true
×
39
    }
40

UNCOV
41
    if (originalErrorHandler) {
×
UNCOV
42
      return originalErrorHandler(err, vm, info, ...rest)
×
43
    }
44
  }
45

46
  window.addEventListener('unhandledrejection', function (event) {
21✔
47
    const reason = event?.reason?.message
×
48

49
    if (reason?.includes('Maintenance error')) {
×
50
      // The API may throw this, and it may not get caught.
51
      const router = useRouter()
×
52
      router.push('/maintenance')
×
53
    } else if (reason) {
×
54
      // No point alerting the user if we have no info.
55
      const miscStore = useMiscStore()
×
56
      const error = new Error(reason)
×
57
      miscStore.setErrorDetails(error)
×
58
      Sentry.captureMessage('Unhandled promise', reason)
×
59
    }
60
  })
61
})
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