mirror of
https://github.com/vercel/commerce.git
synced 2025-07-22 20:26:49 +00:00
Updated errors
This commit is contained in:
@@ -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)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
|
Reference in New Issue
Block a user