mirror of
https://github.com/ArthurDanjou/website-old.git
synced 2026-01-14 20:19:35 +01:00
Add redirect to error page
This commit is contained in:
@@ -23,7 +23,7 @@ import {Announce} from "~/types/types";
|
||||
export default {
|
||||
name: "Announcement",
|
||||
setup() {
|
||||
const {$axios, $sentry} = useContext()
|
||||
const {$axios, $sentry, app} = useContext()
|
||||
|
||||
const announce = useAsync(async () => {
|
||||
const response = await $axios.get('/api/announces', {
|
||||
@@ -35,6 +35,7 @@ export default {
|
||||
return response.data.announce
|
||||
} else {
|
||||
$sentry.captureEvent(response.data)
|
||||
app.error({statusCode: 500})
|
||||
}
|
||||
}, 'announce')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user