79347781

Date: 2025-01-11 09:05:49
Score: 0.5
Natty:
Report link

I had the same problem. I had a bad import. It must be like this

import "github.com/jackc/pgx/v5/pgconn"

var pgErr *pgconn.PgError
if errors.As(err, &pgErr) {
   // code ...
}
Reasons:
  • Whitelisted phrase (-1): I had the same
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Tomas Svojanovsky