Update error handling
This commit is contained in:
1 parent
d43648e1c9
commit
f1fe0510b1
7 files changed
+81
-25
No files matched your search
@@ -1,6 +1,8 @@
|
||||
import { createLogger, format, transports } from 'winston'
|
||||
import { inspect } from 'util'
|
||||
|
||||
import { AuthenticationError as ApolloAuthenticationError } from 'apollo-server-express'
|
||||
|
||||
import { AuthenticationError, DatabaseError, WrongArgumentsError, ServiceUnavailableError } from './errors'
|
||||
|
||||
class LoggerService {
|
||||
@@ -30,4 +32,4 @@ class LoggerService {
|
||||
}
|
||||
|
||||
export const logger = new LoggerService() // Default logger
|
||||
export { LoggerService, AuthenticationError, DatabaseError, WrongArgumentsError, ServiceUnavailableError }
|
||||
export { LoggerService, AuthenticationError, ApolloAuthenticationError, DatabaseError, WrongArgumentsError, ServiceUnavailableError }
|
||||
Reference in new issue
Block a user