Skip to content

Commit

Permalink
fix: should include external error
Browse files Browse the repository at this point in the history
  • Loading branch information
Tuan Nguyen committed Apr 13, 2024
1 parent 68a8dd9 commit 4b53858
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion checksum
Original file line number Diff line number Diff line change
@@ -1 +1 @@
912ca470fc87cc7823ca5dd7b3c8ca3a30ab3653eece433a80c6ce84ce27e25f
a57d48ea7a2817403da1143e49228dcfbe93cee195cfb40288decbc69c170379
24 changes: 12 additions & 12 deletions cover.out
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,16 @@ github.com/kanthorlabs/common/distributedlockmanager/redlock.go:128.2,128.12 1 1
github.com/kanthorlabs/common/distributedlockmanager/utils.go:3.36,4.13 1 1
github.com/kanthorlabs/common/distributedlockmanager/utils.go:4.13,6.3 1 1
github.com/kanthorlabs/common/distributedlockmanager/utils.go:7.2,7.24 1 1
github.com/kanthorlabs/common/gateway/httpx/writer/error.go:3.25,5.2 1 1
github.com/kanthorlabs/common/gateway/httpx/writer/error.go:7.36,9.2 1 1
github.com/kanthorlabs/common/gateway/httpx/writer/writer.go:17.57,21.2 3 1
github.com/kanthorlabs/common/gateway/httpx/writer/writer.go:23.42,25.2 1 1
github.com/kanthorlabs/common/gateway/httpx/writer/writer.go:27.47,29.2 1 1
github.com/kanthorlabs/common/gateway/httpx/writer/writer.go:31.53,33.2 1 1
github.com/kanthorlabs/common/gateway/httpx/writer/writer.go:35.51,37.2 1 1
github.com/kanthorlabs/common/gateway/httpx/writer/writer.go:39.55,41.2 1 1
github.com/kanthorlabs/common/gateway/httpx/writer/writer.go:43.51,45.2 1 1
github.com/kanthorlabs/common/gateway/httpx/writer/writer.go:47.50,49.2 1 1
github.com/kanthorlabs/common/gateway/httpx/middleware/authn.go:19.72,25.31 2 1
github.com/kanthorlabs/common/gateway/httpx/middleware/authn.go:25.31,27.3 1 1
github.com/kanthorlabs/common/gateway/httpx/middleware/authn.go:29.2,29.46 1 1
Expand Down Expand Up @@ -512,16 +522,6 @@ github.com/kanthorlabs/common/gateway/httpx/middleware/logger.go:31.6,33.12 3 1
github.com/kanthorlabs/common/gateway/httpx/middleware/logger.go:36.5,36.46 1 1
github.com/kanthorlabs/common/gateway/httpx/middleware/logger.go:39.4,39.25 1 1
github.com/kanthorlabs/common/gateway/httpx/middleware/recover.go:5.27,7.2 1 1
github.com/kanthorlabs/common/gateway/httpx/writer/error.go:3.25,5.2 1 1
github.com/kanthorlabs/common/gateway/httpx/writer/error.go:7.36,9.2 1 1
github.com/kanthorlabs/common/gateway/httpx/writer/writer.go:17.57,21.2 3 1
github.com/kanthorlabs/common/gateway/httpx/writer/writer.go:23.42,25.2 1 1
github.com/kanthorlabs/common/gateway/httpx/writer/writer.go:27.47,29.2 1 1
github.com/kanthorlabs/common/gateway/httpx/writer/writer.go:31.53,33.2 1 1
github.com/kanthorlabs/common/gateway/httpx/writer/writer.go:35.51,37.2 1 1
github.com/kanthorlabs/common/gateway/httpx/writer/writer.go:39.55,41.2 1 1
github.com/kanthorlabs/common/gateway/httpx/writer/writer.go:43.51,45.2 1 1
github.com/kanthorlabs/common/gateway/httpx/writer/writer.go:47.50,49.2 1 1
github.com/kanthorlabs/common/gateway/query/database.go:5.61,12.2 1 0
github.com/kanthorlabs/common/gateway/query/datastore.go:5.66,13.2 1 0
github.com/kanthorlabs/common/gateway/query/http.go:11.40,18.36 5 1
Expand Down Expand Up @@ -1368,9 +1368,9 @@ github.com/kanthorlabs/common/streaming/nats.go:110.2,115.63 1 1
github.com/kanthorlabs/common/streaming/nats.go:115.63,116.18 1 1
github.com/kanthorlabs/common/streaming/nats.go:116.18,119.5 2 1
github.com/kanthorlabs/common/streaming/nats.go:121.51,123.4 1 0
github.com/kanthorlabs/common/streaming/nats.go:124.79,125.37 1 1
github.com/kanthorlabs/common/streaming/nats.go:124.79,125.37 1 0
github.com/kanthorlabs/common/streaming/nats.go:125.37,129.5 3 0
github.com/kanthorlabs/common/streaming/nats.go:131.4,131.65 1 1
github.com/kanthorlabs/common/streaming/nats.go:131.4,131.65 1 0
github.com/kanthorlabs/common/streaming/nats.go:135.2,135.52 1 1
github.com/kanthorlabs/common/streaming/nats.go:138.78,154.2 1 1
github.com/kanthorlabs/common/streaming/nats.go:156.62,160.50 3 1
Expand Down
2 changes: 1 addition & 1 deletion coverage.out
Original file line number Diff line number Diff line change
@@ -1 +1 @@
97.2
97.1
2 changes: 1 addition & 1 deletion passport/strategies/external.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ func (instance *external) Verify(ctx context.Context, tokens entities.Tokens) (*
}

if !res.Ok() {
return nil, errors.New(res.StatusText())
return nil, fmt.Errorf("%s: %s", res.StatusText(), string(res.Body))
}

var account entities.Account
Expand Down

0 comments on commit 4b53858

Please sign in to comment.