Skip to content

String literals should be replaced with real errors #33

Description

@tndev

In FinTSClient.js and maybe also other places a string is passed as error to the callback instead of a real Error object.

For example:

FinTSClient.js:638:

cb(e.toString(), null, false)

FinTSClient.js:650:

cb('Keine Initialisierung Erfolgreich Nachricht erhalten!', recvMsg, false)

But you should always pass real Error to the error parameter (or as reject to a Promise).

Is there a reason why you choose a string instead of an Error?

I would suggest to change these to real Errors.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions