Skip to content

Commit 6d39077

Browse files
authored
chore: log error when checking if codersdk.Err (#19784)
1 parent 8d5c566 commit 6d39077

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
@@ -1589,7 +1589,7 @@ func (nopcloser) Close() error { return nil }
15891589
// SDKError coerces err into an SDK error.
15901590
func SDKError(t testing.TB, err error) *codersdk.Error {
15911591
var cerr *codersdk.Error
1592-
require.True(t, errors.As(err, &cerr))
1592+
require.True(t, errors.As(err, &cerr), "should be SDK error, got %w", err)
15931593
return cerr
15941594
}
15951595

0 commit comments

Comments
 (0)