chore: log error when checking if codersdk.Err (#19784)

This commit is contained in:
Asher
2025-09-11 13:17:09 -08:00
committed by GitHub
parent 8d5c566a98
commit 6d39077087
+1 -1
View File
@@ -1589,7 +1589,7 @@ func (nopcloser) Close() error { return nil }
// SDKError coerces err into an SDK error.
func SDKError(t testing.TB, err error) *codersdk.Error {
var cerr *codersdk.Error
require.True(t, errors.As(err, &cerr))
require.True(t, errors.As(err, &cerr), "should be SDK error, got %w", err)
return cerr
}