Skip to content

Commit a3ee620

Browse files
committed
Remove unneeded changes
Signed-off-by: Sundeep Gottipati <[email protected]>
1 parent 95d4fa3 commit a3ee620

File tree

2 files changed

+0
-24
lines changed

2 files changed

+0
-24
lines changed

cmd/docker-mcp/internal/desktop/raw_client.go

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import (
44
"bytes"
55
"context"
66
"encoding/json"
7-
"fmt"
87
"io"
98
"net"
109
"net/http"
@@ -52,12 +51,6 @@ func (c *RawClient) Get(ctx context.Context, endpoint string, v any) error {
5251
}
5352
defer response.Body.Close()
5453

55-
// Check for HTTP errors
56-
if response.StatusCode >= 400 {
57-
buf, _ := io.ReadAll(response.Body)
58-
return fmt.Errorf("HTTP %d: %s", response.StatusCode, string(buf))
59-
}
60-
6154
buf, err := io.ReadAll(response.Body)
6255
if err != nil {
6356
return err
@@ -97,12 +90,6 @@ func (c *RawClient) Post(ctx context.Context, endpoint string, v any, result any
9790
}
9891
defer response.Body.Close()
9992

100-
// Check for HTTP errors
101-
if response.StatusCode >= 400 {
102-
buf, _ := io.ReadAll(response.Body)
103-
return fmt.Errorf("HTTP %d: %s", response.StatusCode, string(buf))
104-
}
105-
10693
if result == nil {
10794
_, err := io.Copy(io.Discard, response.Body)
10895
return err
@@ -136,12 +123,6 @@ func (c *RawClient) Delete(ctx context.Context, endpoint string) error {
136123
}
137124
defer response.Body.Close()
138125

139-
// Check for HTTP errors
140-
if response.StatusCode >= 400 {
141-
buf, _ := io.ReadAll(response.Body)
142-
return fmt.Errorf("HTTP %d: %s", response.StatusCode, string(buf))
143-
}
144-
145126
_, err = io.Copy(io.Discard, response.Body)
146127
return err
147128
}

cmd/docker-mcp/oauth/auth.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package oauth
33
import (
44
"context"
55
"fmt"
6-
"strings"
76

87
"github.com/docker/mcp-gateway/cmd/docker-mcp/internal/desktop"
98
)
@@ -13,10 +12,6 @@ func Authorize(ctx context.Context, app string, scopes string) error {
1312

1413
authResponse, err := client.PostOAuthApp(ctx, app, scopes, false)
1514
if err != nil {
16-
// Check if error is about provider not found
17-
if strings.Contains(err.Error(), "not found") {
18-
return fmt.Errorf("OAuth provider does not exist")
19-
}
2015
return err
2116
}
2217

0 commit comments

Comments
 (0)