Client: create DashCreateTeamWrapper

This commit is contained in:
Barry Low committed 2018-09-13 21:42:02 -07:00
1 parent 1637abbc88
commit f7c5e9cc70
8 files changed
+167 -70

No files matched your search

+13
View File
@@ -0,0 +1,13 @@
const ErrorResponse = {
'unique constraint': 'Sorry, already taken! Please create a unique '
}
export const checkGraphQLError = (error) => {
console.log('checkGraphQLError ', ErrorResponse)
if (error.search(/unique constraint/)) {
const field = error.substring(error.indexOf('=') + 1)
console.log('unique constraint', field.replace(/ +/g, ''))
}
}
export default checkGraphQLError