# Vercel Authors - Error Handling – SWR (Highlights)

## Highlights
- You can always get the error object inside the component reactively.
But in case you want to handle the error globally, to notify the UI to show a toast or a snackbar, or report it somewhere such as Sentry,
there's an onError event
```jsx
<SWRConfig value={{
onError: (error, key) => {
if (error.status !== 403 && error.status !== 404) {
// We can send the error to Sentry,
// or show a notification UI.
}
}
}}>
<MyApp />
</SWRConfig>
```