Skip to content

Commit

Permalink
fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
hgiasac committed Sep 23, 2024
1 parent ab50eef commit 54b46e0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions subscription_graphql_ws_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ func waitService(endpoint string, timeoutSecs int) error {
if res != nil {
body, err := io.ReadAll(res.Body)
if err != nil {
return fmt.Errorf(res.Status)
return errors.New(res.Status)
}
return fmt.Errorf(string(body))
return errors.New(string(body))
}
return errors.New("unknown error")
}
Expand Down
2 changes: 1 addition & 1 deletion subscriptions_transport_ws.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ func (stw *subscriptionsTransportWS) OnMessage(ctx *SubscriptionContext, subscri

// try to parse the error object
var payload interface{}
err := fmt.Errorf(string(message.Payload))
err := errors.New(string(message.Payload))
jsonErr := json.Unmarshal(message.Payload, &payload)
if jsonErr == nil {
var errMsg string
Expand Down

0 comments on commit 54b46e0

Please sign in to comment.