revolunet / node-sellsy

Node Sellsy API wrapper
https://github.com/revolunet/node-sellsy
MIT License
17 stars 7 forks source link

Can you disable the errors? #10

Closed Yarflam closed 3 years ago

Yarflam commented 3 years ago

Hi,

I have many errors in my Docker logs and there are not really important to show them, I prefer to save in logs file.

In your script, I see the errors are shown directly: https://github.com/revolunet/node-sellsy/blob/1f1a441194091d6ac01f75f250d2e14f875046db/src/index.js#L55

But if you add "throw new error", my script will can save the errors in my logs. Can you update it and push a new npm version?

Thank you very much ! :)

elieteyssedou commented 3 years ago

Hi,

We need this as well, would be great if we could pass a custom logger or if we could at least disable the error logging.

Thanks

github-actions[bot] commented 3 years ago

:tada: This issue has been resolved in version 1.5.4 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

Yarflam commented 3 years ago

@revolunet Thank you for applying the update.

However I have a problem to use it, the build does not seem to take place:

> require("node-sellsy")
Uncaught:
Error: Cannot find module '\node_modules\node-sellsy\dist\index.js'. Please verify that the package.json has a valid "main" entry
    at tryPackage (internal/modules/cjs/loader.js:322:19)
    at Function.Module._findPath (internal/modules/cjs/loader.js:683:18)
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:953:27)
    at Function.Module._load (internal/modules/cjs/loader.js:842:27)
    at Module.require (internal/modules/cjs/loader.js:1026:19)
    at require (internal/modules/cjs/helpers.js:72:18) {
  code: 'MODULE_NOT_FOUND',
  path: '\\node_modules\\node-sellsy\\package.json',
  requestPath: 'node-sellsy'
}
revolunet commented 3 years ago

argh thanks for reporting, should be fixed in 1.5.5 : https://unpkg.com/browse/node-sellsy@1.5.5/