Skip to content

Commit

Permalink
#827 use IsServiceError
Browse files Browse the repository at this point in the history
  • Loading branch information
smallnest committed Nov 27, 2023
1 parent f421af9 commit 2442c5b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions client/xclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ func (c *xClient) Call(ctx context.Context, serviceMethod string, args interface
if contextCanceled(err) {
return err
}
if _, ok := err.(ServiceError); ok {
if e, ok := err.(ServiceError); ok && e.IsServiceError() {
return err
}
}
Expand All @@ -571,7 +571,7 @@ func (c *xClient) Call(ctx context.Context, serviceMethod string, args interface
if contextCanceled(err) {
return err
}
if _, ok := err.(ServiceError); ok {
if e, ok := err.(ServiceError); ok && e.IsServiceError() {
return err
}
}
Expand Down Expand Up @@ -661,7 +661,7 @@ func (c *xClient) Oneshot(ctx context.Context, serviceMethod string, args interf
}

func uncoverError(err error) bool {
if _, ok := err.(ServiceError); ok {
if e, ok := err.(ServiceError); ok && e.IsServiceError() {
return false
}

Expand Down Expand Up @@ -718,7 +718,7 @@ func (c *xClient) SendRaw(ctx context.Context, r *protocol.Message) (map[string]
if contextCanceled(err) {
return nil, nil, err
}
if _, ok := err.(ServiceError); ok {
if e, ok := err.(ServiceError); ok && e.IsServiceError() {
return nil, nil, err
}
}
Expand Down Expand Up @@ -768,7 +768,7 @@ func (c *xClient) SendRaw(ctx context.Context, r *protocol.Message) (map[string]
if contextCanceled(err) {
return nil, nil, err
}
if _, ok := err.(ServiceError); ok {
if e, ok := err.(ServiceError); ok && e.IsServiceError() {
return nil, nil, err
}
}
Expand Down

0 comments on commit 2442c5b

Please sign in to comment.