prisma-appsync icon indicating copy to clipboard operation
prisma-appsync copied to clipboard

Feature: Ability to subscribe to log events using the Client API

Open maoosi opened this issue 3 years ago • 0 comments

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,
    })
})

maoosi avatar Oct 26 '22 10:10 maoosi