Using generated error types
This commit is contained in:
1 parent
3511a4f022
commit
9dc9e6b031
7 files changed
+45
-73
No files matched your search
@@ -30,8 +30,6 @@ var _ = Service("inventory", func() {
|
||||
Method("addItem", func() {
|
||||
Payload(design.InventoryRecord)
|
||||
Result(Empty)
|
||||
Error("NotFound")
|
||||
Error("BadRequest")
|
||||
|
||||
GRPC(func() {
|
||||
Response(CodeOK)
|
||||
@@ -42,12 +40,10 @@ var _ = Service("inventory", func() {
|
||||
Payload(design.InventoryRecord)
|
||||
Result(Empty)
|
||||
Error("NotFound")
|
||||
Error("BadRequest")
|
||||
|
||||
GRPC(func() {
|
||||
Response(CodeOK)
|
||||
Response("NotFound", CodeNotFound)
|
||||
Response("BadRequest", CodeInvalidArgument)
|
||||
})
|
||||
})
|
||||
})
|
||||
Reference in new issue
Block a user