We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b3d41b8 commit 112ab22Copy full SHA for 112ab22
lib/plugin.js
@@ -172,6 +172,10 @@ const storeModule = {
172
// page, apply it and propagate the error code.
173
if (error.response.data && error.response.data.title && error.response.data.content) {
174
error.response.data.statusCode = error.response.status
175
+ // Set the statusCode for the error
176
+ if (process.server && context.res.statusCode) {
177
+ context.res.statusCode = error.response.data.statusCode
178
+ }
179
commit('page', error.response.data)
180
commit('messages', error.response.data.messages)
181
} else {
0 commit comments