Updated errors

This commit is contained in:
Richard Propst
2021-09-30 09:59:05 -07:00
parent 1efbaa679a
commit d36d1f9470

View File

@@ -45,13 +45,11 @@ const Navbar: FC<NavbarProps> = ({ links }) => (
{ {
console.log('Calling api') console.log('Calling api')
const response = await fetch('/api/error') const response = await fetch('/api/error')
console.log(response.status) console.log(response.ok)
if(response.status === 500) { if(!response.ok) {
console.log('Server error')
Sentry.captureException("API Call to /api/error failed") Sentry.captureException("API Call to /api/error failed")
} }
const data = response.json() const data = response.json()
console.log(data)
} }
} }
> >