We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f99129c commit ceeaeabCopy full SHA for ceeaeab
internal/wordvault/server.go
@@ -332,7 +332,8 @@ func (s *Server) appMaintenance(ctx context.Context) (bool, error) {
332
// Check if the error is related to the table not existing.
333
// If so, don't return an error. We want to make this app as
334
// independent as we can.
335
- if pgErr, ok := err.(*pgconn.PgError); ok && pgErr.Code == "42P01" {
+ var pgErr *pgconn.PgError
336
+ if errors.As(err, &pgErr) && pgErr.Code == "42P01" {
337
log.Info().AnErr("pg-err", pgErr).Msg("waffle-table-not-defined")
338
return false, nil
339
}
0 commit comments