Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
0.14.2
-
None
Description
Say we have a foo endpoint with definition:
service Foo {
FooResponse foo(1: FooRequest request) throws(1: Error1 error1);
}
And we add a new exception to it later:
service Foo {
FooResponse foo(1: FooRequest request) throws(1: Error1 error1, 2: Error2 error2);
}
And when a client hasn't updated to the updated version, and server returns error2, the client will actually get both nil response and nil error.
I checked python version's implementation, and the compiler generated code will actually avoid this situation:
... if result.success is not None: return result.success if result.error1 is not None: raise result.error1 raise TApplicationException(TApplicationException.MISSING_RESULT, "foo failed: unknown result")
We need to do the same in go.
Attachments
Issue Links
- links to