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

getValidationError in the result interface is returning the response #97

Open
alar17 opened this issue Mar 14, 2018 · 2 comments
Open

Comments

@alar17
Copy link
Contributor

alar17 commented Mar 14, 2018

The actual validation errors could be inside of the response which is returned by result.getValidationError(lasSeqNr). This method is actually returning the response/result.

default public Option<Object> getValidationError(long lastSequenceNr) {

@alar17 alar17 changed the title getValidationError on the result interface is returning the result getValidationError in the result interface is returning the result Mar 14, 2018
@alar17 alar17 changed the title getValidationError in the result interface is returning the result getValidationError in the result interface is returning the response Mar 14, 2018
@jypma
Copy link
Contributor

jypma commented Jul 8, 2019

It is... but it is a response indicating there was a validation error. It's up to the implementation whether the validation error IS the response, or IS CONTAINED IN the response.

That's why the actual reply message type is Object.

@jypma
Copy link
Contributor

jypma commented Jul 8, 2019

I think we can only make this more clear if we add a 4th type parameter to CommandHandler and friends, i.e. the reply message type...which would then also always have to be the same type for all commands. It's 99% true for where we use this, but not sure about 100%...

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

No branches or pull requests

2 participants