DataDog / datadog-api-client-typescript

Typescript client for the Datadog API

Home Page:http://datadoghq.dev/datadog-api-client-typescript/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error LogsApi

lucasyarid opened this issue · comments

Describe the bug
I'm trying to dispatch a single log to DataDog and decided to use this official lib instead of doing it via HTTP.

Following the exact example given here I'm getting the current error:

TypeError: missing required attribute 'code' on 'HTTPLogError' object
    at Function.HTTPLogError.deserialize (.../node_modules/@datadog/datadog-api-client/dist/packages/datadog-api-client-v1/models/HTTPLogError.js:26:19)

To Reproduce
Follow exactly as described on DataDog website

Expected behavior
Event being dispatch, or at least a readable error.

Environment and Versions (please complete the following information):
A clear and precise description of your setup:

  • ^1.0.0-beta.5
  • node v14.18.0

Additional context
Seems this package is in it's early development, shall I use something else?

Thank you

Just saw #313 and gonna try the proposed solution

Hi,

There is a window where our examples reflect master code and the release hasn't been done yet. If you remove the contentEncoding option it should work just fine. Sorry for the trouble.

Indeed it worked.
Thanks for the quick answer

It should be fine now with beta 6.