move filer assign volume grpc errror to response

This commit is contained in:
Chris Lu
2020-02-25 17:15:09 -08:00
parent bc38b72a20
commit 0841bedb15
9 changed files with 139 additions and 113 deletions

View File

@@ -73,11 +73,11 @@ func AfterEntryDeserialization(chunks []*FileChunk) {
func CreateEntry(ctx context.Context, client SeaweedFilerClient, request *CreateEntryRequest) error {
resp, err := client.CreateEntry(ctx, request)
if err == nil && resp.Error != "" {
return fmt.Errorf("CreateEntry: %v", resp.Error)
}
if err != nil {
return fmt.Errorf("CreateEntry: %v", err)
}
if resp.Error != "" {
return fmt.Errorf("CreateEntry: %v", resp.Error)
}
return err
}