- Converting all to Typescript
- Installing 1.0.0.beta Quasar Upgrade - (Part 1 - Upgrade Components)
This commit is contained in:
@@ -1,19 +0,0 @@
|
||||
import { i18n } from '../plugins/i18n'
|
||||
import { Notify } from 'quasar'
|
||||
export default (error) => {
|
||||
let message = this.$i18n.t('errors.graphql.undefined')
|
||||
|
||||
if (error[0].validation) {
|
||||
let errors = Object.keys(error[0].validation)
|
||||
message = error[0].validation[errors[0]][0]
|
||||
}
|
||||
|
||||
Notify.create({
|
||||
message,
|
||||
position: 'center'
|
||||
})
|
||||
|
||||
if (message === this.$i18n.t('errors.graphql.undefined')) {
|
||||
console.log(error.response)
|
||||
}
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
// import Backend from './backend'
|
||||
// import Firebase from './firebase'
|
||||
import Graphql from './graphql'
|
||||
|
||||
export default (context, error) => {
|
||||
/*
|
||||
if (error.constructor.name === 'FirebaseError') {
|
||||
Firebase(error)
|
||||
return
|
||||
}
|
||||
if (error.response && error.response.data && error.response.data.backend) {
|
||||
Backend(error)
|
||||
return
|
||||
}*/
|
||||
|
||||
if (error[0] && error[0].locations && error[0].validation) {
|
||||
Graphql(error)
|
||||
return
|
||||
}
|
||||
console.log('Error handler', error)
|
||||
}
|
||||
Reference in New Issue
Block a user