mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
Fix breaking change in errorHandler
This commit is contained in:
parent
246a2f690f
commit
15559dedfc
@ -165,14 +165,7 @@ module.exports = {
|
||||
tokenExpires: 3, // optional, default: 7 (days)
|
||||
// includeNodeModules: true, // optional, default: false (this includes graphql-tag for node_modules folder)
|
||||
// optional
|
||||
errorHandler(error) {
|
||||
/* eslint-disable-next-line no-console */
|
||||
console.log(
|
||||
'%cError',
|
||||
'background: red; color: white; padding: 2px 4px; border-radius: 3px; font-weight: bold;',
|
||||
error.message,
|
||||
)
|
||||
},
|
||||
errorHandler: '~/plugins/apollo-error-handler.js',
|
||||
|
||||
// Watch loading state for all queries
|
||||
// See 'Smart Query > options > watchLoading' for detail
|
||||
|
||||
9
webapp/plugins/apollo-error-handler.js
Normal file
9
webapp/plugins/apollo-error-handler.js
Normal file
@ -0,0 +1,9 @@
|
||||
export default (error, context) => {
|
||||
/* eslint-disable-next-line no-console */
|
||||
console.log(
|
||||
'%cError',
|
||||
'background: red; color: white; padding: 2px 4px; border-radius: 3px; font-weight: bold;',
|
||||
error.message,
|
||||
)
|
||||
context.error({ statusCode: 304, message: 'Server error' })
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user