cryptlex / lexactivator-js

LexActivator API wrapper for Node.js (licensing library)
https://cryptlex.com
MIT License
15 stars 5 forks source link

Missing LexErrorCodes from module export #2

Closed robertsLando closed 5 years ago

robertsLando commented 5 years ago

After the update LexStatusCodes only contains status codes and there is no way to access error codes contained in lexactivator-exception.js. T hey are needed for example in licenseCallback to handle status changes and should be exported in the index.js like LexStatusCodes.

My suggestion is to create an universal function getStatusMessage that returns the message of the error/status from the code, something like the one inside lexactivator-exception.js function getErrorMessage but with status support too.

adnan-kamili commented 5 years ago

Please check out following example:

https://github.com/cryptlex/lexactivator-js/blob/master/examples/sample.js#L34