Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved UserRequestError message if error is ModbusException. #340

Conversation

Zandor300
Copy link
Contributor

If a UserRequestError is thrown because of a Modbus Exception, I added an improved message to the error.

Before it would just print out:

A Modbus Exception Occurred - See Response Body

console.error(..) would print out the response.body.code and using that could be seen what the issue is, but when I use the error in conjunction with Sentry error reporting, it won't provide me those values.

Now the error message will be something like:

ModbusException: ILLEGAL DATA ADDRESS (Code 2) (Device Address 1)

@stefanpoeter Could you take a look?

@Zandor300
Copy link
Contributor Author

@stefanpoeter Could you take a look at my PR?

@stefanpoeter
Copy link
Member

Hi @Zandor300, sorry for the late reply and thank you very much for your contribution. Can you increase the patch number in the package.json. Then I approve it right away.

@Zandor300
Copy link
Contributor Author

@stefanpoeter I've changed the version from 4.0.10 to 40.0.11.

@stefanpoeter stefanpoeter merged commit 796dbb3 into Cloud-Automation:v4.0-dev May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants