get rid of unserializable error type.
This commit is contained in:
+2
-2
@@ -355,12 +355,12 @@ type DealSchedule struct {
|
||||
type DagstoreShardInfo struct {
|
||||
Key string
|
||||
State string
|
||||
Error error
|
||||
Error string
|
||||
}
|
||||
|
||||
// DagstoreGCResult is the serialized form of dagstore.GCResult that we expose
|
||||
// through JSON-RPC to avoid clients having to depend on the dagstore lib.
|
||||
type DagstoreGCResult struct {
|
||||
Key string
|
||||
Error error
|
||||
Error string
|
||||
}
|
||||
|
||||
+1
-1
@@ -76,7 +76,7 @@ func TestReturnTypes(t *testing.T) {
|
||||
seen[typ] = struct{}{}
|
||||
|
||||
if typ.Kind() == reflect.Interface && typ != bareIface && !typ.Implements(jmarsh) {
|
||||
t.Error("methods can't return interfaces", m.Name)
|
||||
t.Error("methods can't return interfaces or struct types not implementing json.Marshaller", m.Name)
|
||||
}
|
||||
|
||||
switch typ.Kind() {
|
||||
|
||||
@@ -278,12 +278,12 @@ func init() {
|
||||
})
|
||||
addExample(api.DagstoreGCResult{
|
||||
Key: "baga6ea4seaqecmtz7iak33dsfshi627abz4i4665dfuzr3qfs4bmad6dx3iigdq",
|
||||
Error: nil,
|
||||
Error: "<error>",
|
||||
})
|
||||
addExample(api.DagstoreShardInfo{
|
||||
Key: "baga6ea4seaqecmtz7iak33dsfshi627abz4i4665dfuzr3qfs4bmad6dx3iigdq",
|
||||
State: "ShardStateAvailable",
|
||||
Error: nil,
|
||||
Error: "<error>",
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user