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

Inconsistent structure of error messages in EventBusBridge #2693

Open
EmadAlblueshi opened this issue Dec 22, 2024 · 7 comments
Open

Inconsistent structure of error messages in EventBusBridge #2693

EmadAlblueshi opened this issue Dec 22, 2024 · 7 comments
Labels
Milestone

Comments

@EmadAlblueshi
Copy link
Contributor

IMHO the structure for the type of error messages should be consistent. The following illustrates inconsistency

JsonObject envelope = new JsonObject().put("type", "err").put("body", err);

Currently, sometimes the content of the error message inside "body" and sometimes inside "message" and we should have unified structure for the type of error messages.

@EmadAlblueshi EmadAlblueshi changed the title Inconsistant structure of error messages in EventBusBridge Inconsistent structure of error messages in EventBusBridge Dec 22, 2024
@vietj vietj added this to the 5.0.0 milestone Dec 22, 2024
@tsegismont
Copy link
Contributor

@EmadAlblueshi any proposal to make in this regard? Always use JSON?

@EmadAlblueshi
Copy link
Contributor Author

Hi @tsegismont

Any error message should be as follows :

{
  "type" : "err",
  "failureType" : "[the exception name like 'socketexception']",
  "message" : "[the message content as 'String']"
}

The above currently implemented but in the EventBusBridge implementation there are "some" error messages as follows :

{
  "type" : "err",
  "body" : "[the message content as 'String']"
}

My proposal is to unify the first structure in all error messages.

@EmadAlblueshi
Copy link
Contributor Author

@tsegismont In addition, this should be done to vertx-eventbus.js too.

@tsegismont
Copy link
Contributor

Would you mind contributing this?

@EmadAlblueshi
Copy link
Contributor Author

Hi @tsegismont

Sure, by next week and this would be planned for Vert.x 5 only as @vietj said because in 4.x it will be a breaking change.

In addition, we should review the existing behavior too probably needs some enhancements if needed.

@tsegismont
Copy link
Contributor

If you can do it early next week it should be fine, we are waiting for a new Netty 4.2 candidate release

@EmadAlblueshi
Copy link
Contributor Author

@tsegismont I will do my best!

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

No branches or pull requests

3 participants