Skip to content

Consider using if (error instanceof PostgresError) in isPgConnectionError #37

@zone117x

Description

@zone117x

The isPgConnectionError function checks for retryable errors using a set of error codes and strings that we've seen so far, and it's not exhaustive (see #36). We should consider checking if the error is an instance of PostgresError at the end of the string matching to catch ones we haven't yet included.

  if (error instanceof PostgresError) {
    return error.message;
  }

Unless there are instances of PostgresError that we want to ignore here?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions