Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd306a2d

Browse files
authored
chore: log with %s on unexpected non-sdk err (#20570)
With `%w` it prints an address instead of the error, like `<op> <url>0xc001329370` instead of `<op> <url>: some error`, honestly idk why youeven can log with `%w` it seems like it makes no sense to use `%w`outside of `fmt.Errorf`.This is to help debugcoder/internal#1010.
1 parent30d2fc8 commitd306a2d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎coderd/coderdtest/coderdtest.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1604,7 +1604,7 @@ func (nopcloser) Close() error { return nil }
16041604
// SDKError coerces err into an SDK error.
16051605
funcSDKError(t testing.TB,errerror)*codersdk.Error {
16061606
varcerr*codersdk.Error
1607-
require.True(t,errors.As(err,&cerr),"should be SDK error, got %w",err)
1607+
require.True(t,errors.As(err,&cerr),"should be SDK error, got %s",err)
16081608
returncerr
16091609
}
16101610

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp