Skip to content

Commit 002f8fc

Browse files
committed
Fix intermittently failing test
1 parent a042249 commit 002f8fc

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

wallet/substrates/http_wallet_json.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ func (h *HTTPWalletJSON) api(ctx context.Context, call string, args any) ([]byte
5555
// Send request
5656
resp, err := h.httpClient.Do(req)
5757
if err != nil {
58-
return nil, err
58+
return nil, fmt.Errorf("failed to make HTTP request: %w", err)
5959
}
6060
defer func() { _ = resp.Body.Close() }()
6161

wallet/substrates/http_wallet_json_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ func TestHTTPWalletJSON_ErrorCases(t *testing.T) {
140140

141141
// Test HTTP request error
142142
t.Run("HTTP error", func(t *testing.T) {
143-
client := NewHTTPWalletJSON("", "http://invalid-url", nil)
143+
client := NewHTTPWalletJSON("", "htp://invalid-url", nil)
144144
_, err := client.api(ctx, "test", map[string]string{"key": "value"})
145145
require.Error(t, err)
146146
})

0 commit comments

Comments
 (0)