File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -90,7 +90,16 @@ async function fetchProduct () {
90
90
91
91
productStore .setProduct (productWithVersion )
92
92
} catch (err ) {
93
+ productStore .setProduct (null )
94
+
93
95
console .error (err )
96
+
97
+ if (err .response ?.status === 404 ) {
98
+ router .push ({
99
+ name: ' not-found'
100
+ })
101
+ }
102
+
94
103
productError .value = getMessageFromError (err )
95
104
}
96
105
}
@@ -105,9 +114,11 @@ async function fetchDocumentTree () {
105
114
}
106
115
// @ts-ignore
107
116
// overriding the axios response because we're specifying what we're accepting above
108
- const res = await documentationApi .listProductDocuments (requestOptions ) as AxiosResponse <ListDocumentsTree , any >
117
+ if (productStore .product ) {
118
+ const res = await documentationApi .listProductDocuments (requestOptions ) as AxiosResponse <ListDocumentsTree , any >
109
119
110
- productStore .setDocumentTree ((res .data ).data )
120
+ productStore .setDocumentTree ((res .data ).data )
121
+ }
111
122
} catch (err ) {
112
123
if (err .response .status === 404 ) {
113
124
productStore .setDocumentTree ([])
You can’t perform that action at this time.
0 commit comments