Skip to content

Commit

Permalink
feat: Remove log when request failed (#14)
Browse files Browse the repository at this point in the history
* to go 1.22.4

* feat: Remove log when request failed
  • Loading branch information
JoydS authored Jun 10, 2024
1 parent 203ce75 commit f3ecbdd
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:

- uses: actions/setup-go@v5
with:
go-version: '1.22'
go-version: '1.22.4'

- name: Build
run: make ci
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:

- uses: actions/setup-go@v5
with:
go-version: '1.22'
go-version: '1.22.4'

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

- uses: actions/setup-go@v5
with:
go-version: '1.22'
go-version: '1.22.4'

- run: make inst

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/tomMoulard/sendbird-go

go 1.22.3
go 1.22.4

require github.com/stretchr/testify v1.9.0

Expand Down
4 changes: 1 addition & 3 deletions pkg/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func NewClient(opts ...Option) Client {
return cfg
}

// do sends a request to the sendbird API.
// do send a request to the sendbird API.
func (c *client) do(ctx context.Context, method, path string, obj any, resp any) (any, error) {
logger := c.logger.With("method", method, "path", path)
logger.Debug("do")
Expand Down Expand Up @@ -72,8 +72,6 @@ func (c *client) do(ctx context.Context, method, path string, obj any, resp any)
logger = logger.With("status", r.StatusCode)

if r.StatusCode < 200 || r.StatusCode >= 300 {
logger.Error("request failed")

return nil, c.handleError(r.StatusCode, r.Body)
}

Expand Down
2 changes: 1 addition & 1 deletion tools/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/tomMoulard/sendbird-go/build

go 1.22.3
go 1.22.4

// FIXME: temporary fix for go.opentelemetry.io/otel/exporters/otlp/internal v0.20.1
replace go.opentelemetry.io/otel/exporters/otlp/internal v0.20.1 => go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.43.0
Expand Down

0 comments on commit f3ecbdd

Please sign in to comment.