Skip to content

[🍒] Remove DBErrorDetailsProvider#553

Merged
psainics merged 1 commit intodata-integrations:release/1.12from
cloudsufi:cherry-pick/8d7e9cd90ae48bd62b531582c05c7e194c956000
Jan 29, 2025
Merged

[🍒] Remove DBErrorDetailsProvider#553
psainics merged 1 commit intodata-integrations:release/1.12from
cloudsufi:cherry-pick/8d7e9cd90ae48bd62b531582c05c7e194c956000

Conversation

@psainics
Copy link
Contributor

🍒 [cherrypick]

Commits :

PR:


Remove DBErrorDetailsProvider

Description

  • Remove DBErrorDetailsProvider
  • Move Doc Link from error message to error reason.

Code change

  • Deleted DBErrorDetailsProvider.java
  • Modified AbstractDBSink.java
  • Modified AbstractDBSource.java
  • Modified MysqlErrorDetailsProvider.java
  • Modified PostgresErrorDetailsProvider.java

Tests [ MySql ]

image

[
  {
    "stageName": "MySQL2",
    "errorCategory": "Plugin-'DB Integrity Constraint Violation'-'MySQL2'",
    "errorReason": "Duplicate entry '1' for key 'PRIMARY'. For more details, see https://dev.mysql.com/doc/mysql-errors/9.0/en/",
    "errorMessage": "Error occurred in the phase: 'Writing' with sqlState: '23000', errorCode: '1062', errorMessage: Duplicate entry '1' for key 'PRIMARY'",
    "errorType": "USER",
    "dependency": "true",
    "errorCodeType": "SQLSTATE",
    "errorCode": "23000",
    "supportedDocumentationUrl": "https://dev.mysql.com/doc/mysql-errors/9.0/en/"
  }
]

Tests [ postgresql ]

image

[
  {
    "stageName": "PostgreSQL2",
    "errorCategory": "Plugin-'Postgres Integrity Constraint Violation'-'PostgreSQL2'",
    "errorReason": "Batch entry 0 INSERT INTO \"user2\" (\"id\",\"name\",\"age\",\"gender\") VALUES (1,'Alice',25,'female') was aborted: ERROR: duplicate key value violates unique constraint \"user2_pkey\"\n  Detail: Key (id)=(1) already exists.  Call getNextException to see other errors in the batch. For more details, see https://www.postgresql.org/docs/current/errcodes-appendix.html",
    "errorMessage": "Error occurred in the phase: 'Writing' with sqlState: '23505', errorCode: '0', errorMessage: Batch entry 0 INSERT INTO \"user2\" (\"id\",\"name\",\"age\",\"gender\") VALUES (1,'Alice',25,'female') was aborted: ERROR: duplicate key value violates unique constraint \"user2_pkey\"\n  Detail: Key (id)=(1) already exists.  Call getNextException to see other errors in the batch.",
    "errorType": "USER",
    "dependency": "true",
    "errorCodeType": "SQLSTATE",
    "errorCode": "23505",
    "supportedDocumentationUrl": "https://www.postgresql.org/docs/current/errcodes-appendix.html"
  }
]

@psainics psainics self-assigned this Jan 29, 2025
@psainics psainics added the build label Jan 29, 2025
@psainics psainics marked this pull request as ready for review January 29, 2025 10:52
@psainics psainics merged commit f0ce6d2 into data-integrations:release/1.12 Jan 29, 2025
10 of 12 checks passed
@psainics psainics deleted the cherry-pick/8d7e9cd90ae48bd62b531582c05c7e194c956000 branch January 29, 2025 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants