exceptionless / Exceptionless.JavaScript

Exceptionless JavaScript client
http://exceptionless.com
Apache License 2.0
59 stars 24 forks source link

Testing New JavaScript Workspaces Packages #99

Closed polluterofminds closed 1 year ago

polluterofminds commented 3 years ago

Browser

React

Node

Angular

polluterofminds commented 3 years ago

Node Errors

The error seems to be thrown in the error plugin here:

const result = await parser.parse(context, exception);

This is as a result of the client configuration not having errorParser defined:

const config = context.client.config;
const parser = config.services.errorParser;
niemyjski commented 3 years ago

@polluterofminds is Exceptionless.startup() being called? That service is set inside of startup. https://github.com/exceptionless/Exceptionless.JavaScript/blob/feature/workspaces/packages/node/src/NodeExceptionlessClient.ts#L22

polluterofminds commented 3 years ago

@niemyjski Yep it is.

await Exceptionless.startup((c) => {
  c.apiKey = "TEST KEY";
  // c.serverUrl = "http://localhost:5000";
  c.useDebugLogger();

  c.defaultTags.push("Example", "Node");

  // set some default data
  c.defaultData["SampleUser"] = {
    id: 1,
    name: "Blake",
    password: "123456",
    passwordResetToken: "a reset token",
    myPasswordValue: "123456",
    myPassword: "123456",
    customValue: "Password",
    value: {
      Password: "123456",
    },
  };
});

Steps to repro coming...

polluterofminds commented 3 years ago

Exceptionless Node Bug in Express App:

NodeJS Version: v14.15.0 NPM version: 7.10.0

  1. cd example
  2. cd express
  3. Open example/express/app.js
  4. Make sure API key and server URL is properly configured
  5. npm run dev or npm run start
  6. Make a get request to http://localhost:3000/trycatch
niemyjski commented 1 year ago

This has been fixed in the 2.0 release.