Skip to content

Commit

Permalink
Revert "suppress network/api errors"
Browse files Browse the repository at this point in the history
This reverts commit 187e2da.
  • Loading branch information
stackchain committed May 24, 2022
1 parent 33948c8 commit 05e20a5
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/index.tsx
Expand Up @@ -5,7 +5,6 @@ import {AppRegistry, LogBox, Text} from 'react-native'
import {Provider, useSelector} from 'react-redux'

import {handleGeneralError, setupHooks} from '../legacy/actions'
import {ApiError, NetworkError} from '../legacy/api/errors'
import {CONFIG} from '../legacy/config/config'
import getConfiguredStore from '../legacy/helpers/configureStore'
import translations from '../legacy/i18n/translations'
Expand All @@ -14,6 +13,7 @@ import {setLogLevel} from '../legacy/utils/logging'
import App from './App'
import {name as appName} from './app.json'
import {ErrorBoundary} from './components/ErrorBoundary'

setLogLevel(CONFIG.LOG_LEVEL)

bluebird.config({
Expand Down Expand Up @@ -42,11 +42,7 @@ global.Promise = bluebird as any

const cache = createIntlCache()
const intl = createIntl({locale: 'en-US', messages: translations['en-US']}, cache)
global.onunhandledrejection = (error) => {
if (error instanceof NetworkError) return
if (error instanceof ApiError) return
handleGeneralError(error.message, error, intl)
}
global.onunhandledrejection = (e) => handleGeneralError(e.message, e, intl)

const store = getConfiguredStore()
store.dispatch(setupHooks())
Expand Down

0 comments on commit 05e20a5

Please sign in to comment.