prisma-appsync
prisma-appsync copied to clipboard
Feature: Ability to subscribe to log events using the Client API
prismaAppSync.on('log', (log) => {
console.log({
// 'INFO' | 'WARN' | 'ERROR'
level: log.level,
// 'UNDEFINED' | 'FORBIDDEN' | 'BAD_USER_INPUT' | 'INTERNAL_SERVER_ERROR' | 'TOO_MANY_REQUESTS'
type: log.type,
// 200 | 401 | 400 | 500 | 429
code: log.code,
// string
message: log.message,
// string
trace: log.trace,
})
})