-
Notifications
You must be signed in to change notification settings - Fork 820
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: return an unknown service/method exception to client correctly u…
…nder multi_service server scenario (#1503)
- Loading branch information
1 parent
1256b7d
commit c8843e4
Showing
4 changed files
with
72 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
include "base.thrift" | ||
include "self_ref.thrift" | ||
include "extend.thrift" | ||
namespace go kitex.test.server | ||
|
||
enum FOO { | ||
A = 1; | ||
} | ||
|
||
struct InnerBase { | ||
255: base.Base Base, | ||
} | ||
|
||
struct ExampleReq { | ||
1: required string Msg, | ||
2: FOO Foo, | ||
3: InnerBase InnerBase, | ||
4: optional i8 I8, | ||
5: optional i16 I16, | ||
6: optional i32 I32, | ||
7: optional i64 I64, | ||
8: optional double Double, | ||
255: base.Base Base, | ||
} | ||
struct ExampleResp { | ||
1: required string Msg, | ||
2: string required_field, | ||
3: optional i64 num (api.js_conv="true"), | ||
4: optional i8 I8, | ||
5: optional i16 I16, | ||
6: optional i32 I32, | ||
7: optional i64 I64, | ||
8: optional double Double, | ||
255: base.BaseResp BaseResp, | ||
} | ||
exception Exception { | ||
1: i32 code | ||
2: string msg | ||
} | ||
|
||
struct A { | ||
1: A self | ||
2: self_ref.A a | ||
} | ||
|
||
service ExampleService extends extend.ExtendService { | ||
ExampleResp ExampleMethod(1: ExampleReq req)throws(1: Exception err) | ||
ExampleResp UnknownMethod(1: ExampleReq req) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters