Skip to content

UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'render' of undefined #1

@keneo

Description

@keneo
const structuredLog = require('structured-log');
const httpSink = require('serilog-http-sink');

const log = structuredLog.configure()
  .writeTo(new structuredLog.ConsoleSink())
  .writeTo(httpSink({ url: 'http://xxxxxxxxx:31112' }))
  .create();
log.info("login");
(node:20676) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'render' of undefined
    at HttpSink.self.emit (C:\repos\fitness\slackbot\node_modules\serilog-http-sink\serilog-http-sink.js:41:51)
    at SinkStage.emit (C:\repos\fitness\slackbot\node_modules\structured-log\dist\structured-log.js:692:19)
    at C:\repos\fitness\slackbot\node_modules\structured-log\dist\structured-log.js:645:83
    at process._tickCallback (internal/process/next_tick.js:68:7)
(node:20676) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:20676) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions