First Committ

This commit is contained in:
Paolo Arena
2021-08-31 18:09:59 +02:00
commit 1d6c55807c
299 changed files with 55382 additions and 0 deletions

21
src/error-handler/index.ts Executable file
View File

@@ -0,0 +1,21 @@
// import Backend from './backend'
// import Firebase from './firebase'
import Graphql from './graphql'
export default (context: any, error: any) => {
/*
if (error.constructor.nametranslate === '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)
}