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

Remove duplicate response protos #256

Open
devoxel opened this issue Dec 2, 2018 · 2 comments
Open

Remove duplicate response protos #256

devoxel opened this issue Dec 2, 2018 · 2 comments

Comments

@devoxel
Copy link

devoxel commented Dec 2, 2018

Ross pointed out that our response protos should probably be de-deplicated where possible. I think this would probably be quite helpful, we could write util code that would check any response proto and log it if there was an error.

@CianLR
Copy link
Member

CianLR commented Dec 2, 2018

Something such as

message RabbleResponse {
  enum ResponseType {
    OK = 0
    ERROR = 1
  }

  ResponseType response_type = 1;
  string err = 2;

  FollowsResponse follows_response = 3;
  DatabaseResponse database_response = 4;
  ...
}

The service response messages there can throw away the enum stuff and only include the bits needed. Since they're optional it shouldn't be an issue to have them all combined I think.

@devoxel
Copy link
Author

devoxel commented Dec 2, 2018

Would it make sense to make a ResponseStatus thats included in other responses? Your way seems like it could get quite big, and includes a lot of info from other sources.

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

No branches or pull requests

2 participants